cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestions how to resize/compress images to be stored in a DB?

vlad1
Participant
0 Kudos

Hi,

Powerbuilder 11.5.1 application running on SQL Anywhere 11 DB

We are investigating possibilities to store images relating to rows in our table, we will probably do it as suggested, using Long Binary data type.

However, what would be really neat is if we had a way of resizing (cropping if needed) each image to a specific width / height in pixels, and also, just in case that these images were taken with a very large resolution, compress them down (photo quality not that important) to, say, 200kb-300kb at most. This would have to be done at the powerbuilder application level, when the user selects the image(s) to store.

Any ideas or guides on what is the best way to achieve this? There doesn't seem to be anything native in the libraries, does anyone know of any PB tools written that could accomplish this?

Cheers

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi all,

some year ago  i published the following article on ISUG :

http://www.slideshare.net/marcocimaroli/image-magic-for-powerbuilder

I can share PB source files.

Thanks

Marco

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Vlad;

  I use ImageMagicK (IM) to resize, crop, convert, compress, redact, etc any image. I have tons of example code that utilizes IM from its OLE container (32 bit only) or better yet through the MS-Windows "PowerShell" (both 32 & 64bit supported). Let me know if you decide to go that route and what examples you need.

Regards ... Chris

Former Member
0 Kudos

You can use ImageMagick to resize images.

Dropbox - PbMagick10ISUG.rar

Marco

CobyKako
Advisor
Advisor
0 Kudos

Hello,

Use this 3rd party utility: Topwiz Software - Zlibwapi

HTH

Jacob