• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

Post reply

Other options

Shortcuts: ALT+S save/post or ALT+P preview

Topic summary

Posted by yapt
 - 10 February 2009, 16:23:47
Sorry my delay Galfar....

The format to save my images maybe jpeg, but at last I would like to lookup a way to save the images on the original format (I am saving all of them on SQLite fields).

I will try this code in a few days (perhaps the weekend).

Thanks a lot for your answer and sorry my delay again...

Greetings.
Posted by Galfar
 -  1 February 2009, 23:38:39
Well, I found this VB code that should do what you want to do: calculate
image dimensions given the max space they can occupy.
In what data format you want to save your images?
You would need to change first line to something like this (image.Width * image.Height * BytesPerPixel). 

shrinkFactor = MaxFieldLength / (image.Width * image.Height) 
outImageWidth = CInt(Math.Sqrt(shrinkFactor) * image.Width) 
outImageHeight = CInt(Math.Sqrt(shrinkFactor) * image.Height) 

Posted by yapt
 -  1 February 2009, 15:00:27
Hello,

I am new to Vampyre Imaging library, I only want use imaging library to save an image to a sqlite database.  Then sqlite has a maximum size for the database image column.

I would like to know if I have any function to reduce (maintaining aspect ratio) the image memory size to any value I can specify.  I have read Resize and ResizeImage functions.  But both of them need an aspect limits (width or height).  But I would like to reduce any image to a 1Mb (ie) memory size.

Any clue about this ?
SMF spam blocked by CleanTalk