PDA

Click to See Complete Forum and Search --> : Need a challenge?


André
Jan 25th, 2000, 08:13 PM
Hey guys, this should be fun:


I want to be able to format a picture however I want.

Let me explain. My users don't know the difference between gif's, bmp's or jpeg's, nor they know anything about pixels or KBites.

They have to chose a picture from their disk to import to the application.

The thing is, that I want to be able to format the picture to a Jpeg, with a fixed 200*100 pixels size and under 20KB, no matter what format they have chosen.

Is this possible from VB?, any API that can do this?

My idea is to write a com object that receives the picture as a parameter formats it and returns a jpeg formatted after my specifications.

Can this be done?
any suggestions?
Please help,

Best regards
André

mooose
Jan 25th, 2000, 08:59 PM
ummmm I don't really understand what you mean by your question... but when I want to change a pictures format I have done it with an example like so with success:

Private Sub Command1_Click()
picture1.picture = Loadpicture("C:\mooose.gif")
end sub

Private Sub Command2_Click()
SavePicture Picture1.Picture, "C:\mooose.jpg"
end sub

I don't know about compression though depends how the user has the compression rate set,


------------------
Mooose

Crazy D
Jan 25th, 2000, 10:06 PM
You can only save as bitmap with vb.
However, there's a dll which allows you to save pics as jpg: http://dilib.hypermart.net/dl/dijpg.htm