Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.


dzImage Library


Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 12-29-2007, 12:05 PM
klaus's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: Switzerland
Posts: 434
Awards Showcase
Competition Winner 
Total Awards: 1
Default

Hello dzt
Thank's for your information, I already had some of them but it's always interesting to have several sources. But I left for the moment the save ICO function besides, because as you say it needs some deep diving into it.
The Icon Editor has improved,
- almost all the drawing functions work as I want them to do
- edit functions copy, paste, cut also undo, redo not yet done.
- save and load bmp, jpg and gif was quite easy with your library and the ImageLib.
Load ICO I will look at Erel's code.
Save ICO is the challenge for the next days.
I don't want to send the code as long as the save ICO functon is not implemented to ensure that the program does at least the basic functions that it is made for.
And of course I want to make the icon for this program with itself !
And just another screenshot.

Klaus
Switzerland
Attached Images
File Type: jpg IconEdit1.jpg (27.7 KB, 20 views)
Reply With Quote
  #22 (permalink)  
Old 12-29-2007, 02:34 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by alfcen View Post
1. Rotation Angle 0 blacks out the screen or image control.
2. While running fine in the IDE, the exe sometimes prompts
"Invalid Pixel Format" error upon InvertImage.
3. Also upon Invert, the desktop shows correct, while the device does
not invert (perhaps I am seeing things the wrong way round).
Hello Robert,

1. Solved (I think). Actualy Angle 0 returns the image as it was. Did you expect anything else?
2 & 3. Can you post a simple code with an image that acts like you are describing?

I hope these bugs does not affect your accomodation proposal.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #23 (permalink)  
Old 12-29-2007, 05:09 PM
Senior Member
 
Join Date: May 2007
Posts: 150
Awards Showcase
Competition Winner 
Total Awards: 1
Default

Dimitris
I am afraid to ask for anything because you just sit down to work on it.
The fast rotate is fast and I managed to have the map oriented with the heading quite quickly.
I am still fighting with the size of the result because, if I understand correctly, the copying to the form may change the size, not to let the image "spill over the sides".
In my program I drawimage the map, after sizing it to the required size, with the left top corner somewhere above and to the left of the form. This way the form gets the part of the map which it should get according to the right position. I use drawimage because I need the x,y,width and height definitions, but drawimage works on forms only.
When I rotate the image from the form - it works only on the part that is on the form, while I need also the surrounding parts which should be on the form after the rotation. If there is a way to do it I will not have to play with the resizing.
Take few days off before you answer...

Robert
This program works with raster maps, not vectors, and is for off-road navigation. The program I saw doing it is for the same use, actually I "borrowed" some ideas from it. That program was for WM 2003 and is not maintained any more.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #24 (permalink)  
Old 12-29-2007, 06:55 PM
Senior Member
 
Join Date: May 2007
Posts: 150
Awards Showcase
Competition Winner 
Total Awards: 1
Default colors

dimitris (or any other who can help)
Well I solved the sizing issue, taking a smaller width and height of the map before the rotation, so that after rotated it matches the form width.

Still, there is a strange behaviour of the color of the part which is not the map - the color is changing all the time. In the thumbnail you can see example with two different colors. I shall appreciate an advice, I think it has to do with the pixel at 0,0 but I need help in this.

Thanks again.
Attached Images
File Type: jpg gray.JPG (30.3 KB, 20 views)
File Type: jpg g2.JPG (25.5 KB, 27 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #25 (permalink)  
Old 12-30-2007, 10:40 AM
Senior Member
 
Join Date: May 2007
Posts: 150
Awards Showcase
Competition Winner 
Total Awards: 1
Default

I Have found how to control the color also - it is the color of the pixel at the top-left of the image I take to rotate.
So I color this pixel before I take the image.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #26 (permalink)  
Old 12-30-2007, 12:19 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 422
Default

Hello Dimitris,

The most important issue first: no affect on your accommodation

I attached the whole prototype.
In there, blur.sbp demonstrates the "Clear Screen"
method using Rotation = 0. Please ignore the Blur function, it's a joke

As for item 2, please select Offline, pick an image, press the palette button
(rainbow icon) and then [N] for negative. Here I find

IDE: ok
desktop EXE Ver 6.01: Invalid Pixel Format
desktop EXE Ver 5.8: ok
device: ok

My desktop runs XP Home Edition.

Each image is 480 x 480, a palette image is 300 x 10 pixels

Enjoy playing with the program, eeh, prototype.
I can wait for the answer until next year

Edit: Sorry mate, I forgot, in chosa.sbp please REM the line Registration in App_Start.
Attached Files
File Type: zip Chosa.zip (449.8 KB, 18 views)

Last edited by alfcen : 12-30-2007 at 02:13 PM.
Reply With Quote
  #27 (permalink)  
Old 12-31-2007, 02:16 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi guys,

derez, I'm glad you are having progress. You are right about Pixel(0,0). It's colour is used to fill the empty space. The same technique is used by the new (2008) CombineImagesHorizontal and CombineImagesVertical functions.

klaus, my daughter already waits for your paint program

Robert, nice blur func... eeh joke! I've allready implemented a CreteEmptyImage (like clear) function. The issue about InvertImage solved. The problem was the 1 byte per pixel format. One a have to say. I wish I had astronomy as a hobby to use your software.

Next update 2008 (I mean GMT+2 2008 not GMT+9)

Are there any other issues before I'll post the update?

I wish you to enjoy 2008 much more than 2007.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #28 (permalink)  
Old 12-31-2007, 04:16 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 422
Default

Haisai Dimitris,

With resolving the InvertImage issue there is nothing more I could wish for.
As you have seen, I used a different approach for magnification, reason
being, I saw "Out of Memory" errors on the device beyond 140% using
ZoomImage. There was no such error on the desktop - naturally

Astronomy is part of human exploration. Just raise your eyes up
during a clear night and enjoy what you see. Whatever you are looking
at you are seeing the past. The "Great Orion Nebula" is 1,500 light-years
away. You are looking at an object as it was 1,500 years ago.
And...most constellations were born from Greek mythology, a most valuable
heritage.

All the very best!
Robert
Reply With Quote
  #29 (permalink)  
Old 12-31-2007, 05:27 PM
Senior Member
 
Join Date: May 2007
Posts: 150
Awards Showcase
Competition Winner 
Total Awards: 1
Default

Dimitris
For the black screen problem I use direct copy instead of rotation so I have a way around with an if.
It would be nice if you find why and correct it, no hurry...

Robert
I want to recomend a book for you to read - "Strata" by Terry Pratchet.
Its fiction, but has a very interesting point of view about "previous" and "later". It involves lots of stars of course.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #30 (permalink)  
Old 01-02-2008, 08:12 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

The 2008 update.

Bugs corrected:
RotateImage, angle = 0 acts correctly now.
InvertImage works OK for Images with 8 bits colour depth.

Added:
CombineImagesHorizontal(Image1, Image2): Returns a new Image. The Left part is Image1 and right part is Image2. New width = width1+width2 and new height = height of the highest Image. The empty space is filled with the colour of pixel(0,0) of Image1

CombineImagesVertical(Image1, Image2):
Returns a new Image. The upper part is Image1 and bottom part is Image2. New height = height1+height2 and new width = width of the wider Image. The empty space is filled with the colour of pixel(0,0) of Image1

CreateEmptyImage(Width, Height, alpha, red, green, blue): Return a new image with the above characteristics.

DrawImage(targetImage, sourceImage, x, y, width, height): Draws the sourceImage in a rectangle (x,y,width, height) on targetImage. Returns the new Image
Attached Files
File Type: zip dzImage_05.zip (14.9 KB, 90 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 48 07-18-2008 02:33 PM
Merging Outlook library and Phone library Erel Official Updates 2 07-14-2008 03:38 PM


All times are GMT. The time now is 05:54 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0