开发者

Saving image as JPG -library?

开发者 https://www.devze.com 2022-12-20 06:30 出处:网络
I\'d like to find a JPEG-writing library that can be statically linked (so there are no DLL dependencies). No JPEG-reading ability is required.

I'd like to find a JPEG-writing library that can be statically linked (so there are no DLL dependencies). No JPEG-reading ability is required.

Edit: I got LibGD working, but it had开发者_如何学运维 one problem described here:

LibGD library is not working: crash when saving image


libjpeg is the most popular library for saving jpegs, but it can be a bit of a pain to use.

Edit, here is a simple example of how to use it. Look for the function juce_writeJPEGImageToStream.


Have you looked at LibGD? I can't seem to find the license, but neither did you specify a requirement.


If you're running your application on Windows then you should use the standard, built-in "GDI+" library that Microsoft provides. Every computer running XP or later has this library.

GDI+ is intended to supersede GDI, which is what you're probably already using whether you know it or not, but it can co-exist with GDI calls provided you flush the buffers when switching between the two. See:

http://www.cpjj.net/Miscellaneous/CreateJPEGFromDC.htm

(Hans Passant - you should have written your comment as an answer).

0

精彩评论

暂无评论...
验证码 换一张
取 消