Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving image as .jpg 1

Status
Not open for further replies.

kodr

Programmer
Dec 4, 2003
368
I know the ins and outs of doing this has been discussed on the board before. I've tracked down two possible ways of saving the contents of an image box as a .jpg, one to use bitblt, and one to use the intel library.

Is there any advantages of one over the other? I'm looking to keep things as simple as possible. My real goal is to take an image, compress it down (hence .jpg, unless there's something simpler) and send it through the internet to a client app.

I've got the transmission part working fine, but a 208k bitmap seems to take more time to transmit then I want. I looked into using the bmp2jpg.dll library, but I have doubts about the source of this, and it seems to have memory issues.

I'm not looking for a step by step or even code, I can research that, I'm just looking for input as to which way I should concentrate my efforts.

Thanks.
 
>discussed on the board before. I've tracked down two possible ways of saving

You've missed at least two other ideas that I've discussed in this forum: dijpg.dll and GDI+

I tend to use GDI+, since it is built-in ...
 
I don't remember running across those two (I've seen references to GDI+ but I didn't realize it would do this.)

I'll look into these, thanks!
 
strongm,

Thanks again. I found both the dijpg.dll and your sample GDI+ post.

They both seem (sort of) simple to use (thanks to your sample.)

My next step is to test to see if there's any speed/memory differences involved. Making progress now!
 
Google for bmp2jpeg.dll. It converts a saved bmp to a jpg, which you can the delete.

-David
2006 Microsoft Valueable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
Yeah, I don't know much about the origin of bmp2jpeg.dll but it seems to issues with not releasing memory after use. No big deal after one conversion, but after many it ties up my system resources.
 
Oops. Sorry about missing that. I've never had an issue with it, though. Maybe there is something else that contributes to the memory leak?

-David
2006 Microsoft Valueable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top