Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P 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
  #1 (permalink)  
Old 12-24-2007, 12:47 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Smile dzImage Library

Hi all,

This is my Image Library for Device and Desktop. Short description follows.

Methods:
ScreenCapture: Captures the whole screen.
ScreenCapture2(x,y,width,Height): Captures part of the screen.
ControlCapture(ControlName,x,y,width,Height): Captures part of a control. x,y are relatives to control upper left corner. The control can be a form or any other control
SaveImageBMP(Image, FileName): Saves the Image as BMP to a file with filename Filename.
SaveImageJPEG(Image, FileName): Saves the Image as JPG to a file with filename Filename.
SaveImageGIF(Image, FileName): Saves the Image as GIF to a file with filename Filename.
CopyImage(sourceImage, x,y,width, height): Copies a part of an image. Returns the new cropped Image (part of the source)
RotateImage(sourceImage, angle): Rotates an image. Angle can be one of 0, 90, 180, 270. Returns the rotated Image
ZoomImage(sourceImage, Percent): Zoomes an image Percent% of the original (Percent = 0 to 1000). Returns the Zoomed Image
ImageSize(Image): Returns an array(2) containing width and height of the image. array(0) = width and array(1) = height

Properies:
Image: The recently captured image

For how to use it see the included in the attached zip, test2.sbp
Attached Files
File Type: zip dzImage.zip (11.5 KB, 573 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #2 (permalink)  
Old 12-24-2007, 01:13 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yasou Dimitris,

You continue amazing me !
Indispensable for astronomy applications that need to adjust star charts and
planet surface views to simulate different optical systems.

I guess the next version will include

1. MirrorUpDown
2. MirrorLeftRight
3. InvertImage

No, no, please, don't amaze me again

Happy Holidays!
Robert

Supplement:
I had some fun 'playing' with dzImage
No problems encountered, except for RotateImage angle = 0 blacks the form out,
but can be worked around by rotating the source of dr.Image 90 degs every time.
Can't play around any longer, today's my turn for cooking.

Thanks a lot for the new jewel!

Robert

Last edited by alfcen : 12-24-2007 at 07:01 AM.
Reply With Quote
  #3 (permalink)  
Old 12-24-2007, 05:07 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,689
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Amazing work dzt
If I'm not mistaken it requires .Net CF 2.0.
Reply With Quote
  #4 (permalink)  
Old 12-24-2007, 03:26 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Thank you guys for your kind words.

Yes Erel I forgot it. Requires .NET 2.0 (.NETCF 2.0 for the device)

Robert your wishes is an order for me.

New version with:

New Methods:
FlipHorizontal(sourceImage): Flips Horizontal the image
FlipVertical(sourceImage): Flips Vertical the image
InvertImage(sourceImage): Inverts the colours of the image

Changed Property:
Image: The Image property is not any more ReadOnly. You can also use it to store an Image

See included FlipInvert.sbp

Happy Holidays to all!
Attached Files
File Type: zip dzImage_02.zip (12.2 KB, 187 views)
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #5 (permalink)  
Old 12-24-2007, 03:53 PM
Senior Member
 
Join Date: Jul 2007
Location: Michigan Usa
Posts: 176
Awards Showcase
Beta Tester 
Total Awards: 1
Default

@dzt

Your having way too much fun. Even though I haven't needed it yet, when I get there I'm problably going to. You make erel's already great program even greater along with a few other members of this forum.
__________________
Using 6.90
dennishea
Reply With Quote
  #6 (permalink)  
Old 12-24-2007, 03:57 PM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Haisai Dimitris,
Agijabiyo, I was afraid you would do that.
The good thing about you is, you keep me away from the streets.
Fantastic, entirely new perspectives for image presentations.
It's nearly 2:00AM on this island. I will feed you back any findings, shortly,
if any.
Thanks so much!
Robert
Reply With Quote
  #7 (permalink)  
Old 12-24-2007, 07:37 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default map as an image

hi Dimitris
Your library is expanding the capabilities of this software in steps too large for me ! its fantastic.

If I want to know the size of a jpg file which I display on a form using form.DrawIimage - how do I do it ? (the file size is bigger than the screen, lets say 1000X1000).
The Imagesize gives me the size of the screen and I need the size of the original image file.
If your library can work on the whole image - it will be very useful for my navigation program.

Maybe there is a way to know the properties of an image file even before drawing it on the form.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #8 (permalink)  
Old 12-25-2007, 09:13 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi David,

You should load the big image somewhere. An ImageList, a hidden Image control, a hidden form or something. After that you can get it's size using dzImage.ImageSize.

Then you can draw the part of it you want using dzImage.CopyImage
__________________
Dimitris Zacharakis
http://www.terracom.gr

Last edited by dzt : 12-25-2007 at 09:16 AM.
Reply With Quote
  #9 (permalink)  
Old 12-25-2007, 07:41 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Thank for the idea.
I could not resist and went directly to upgrade my navigation program - to enable the user to rotate the map.
Amazing - it was very easy, after you did all the work in the library.
I also managed to correct some aspect ratio problems

I attach pictures of the screen with the 4 rotation states.

I am very excited about it, thank you again
Attached Images
File Type: jpg north_1.JPG (76.7 KB, 95 views)
File Type: jpg east_1.JPG (73.1 KB, 42 views)
File Type: jpg west_1.JPG (73.4 KB, 44 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #10 (permalink)  
Old 12-26-2007, 06:32 AM
alfcen's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu Islands
Posts: 810
Send a message via Skype™ to alfcen
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hello David,
The aspect is not a 'problem', it's a feature. You can use it for image
processing, in this very case, a blur effect. You set the blur factor
simply by the number of rotations using 90 or 270 degrees
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
dzImage wolfgang Additional Libraries 8 10-10-2009 03:03 PM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 10:16 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0