1. BMP图片向JPG格式的转化
可以参考文章
http://www.computing.net/answers/programming/c-code-convert-bmp-to-jpeg-file/4383.html
中的建议,摘录重要部分如下:
As tech-fred said, regular JPEGs are lossy. Photographic images generally cannot be squished as much as JPEGs, without some detail loss (somewhat like MP3s in audio). If you need a non-lossy compact format other than RLE'd bitmaps, compressed TIFFs are popular. They are commonly used with graphicssoftware for high-quality storage (though not used on web pages or as GUI resources). The PNG format is also good, and getting quite popular. Source is freely available for both. Finding free libraries using searches engines is difficult; you have to know where to search. Keep bookmarks for these sites: sourceforge.net, codeguru.com, freshmeat.net, simtel.net; there are many others. You will have good luck going directly to Open Source sites, which aren't commercial, of course, so search sites do not get paid to give them high visibility. If you are mostly Windows-oriented, don't be put off by all the Unix/Linux talk; C and C++ source is fairly portable, and much source is for Windows too. In general when looking for free source, you can also search for projects that uses the kind of software you want to use, download it, and read the docs which tell you where to get other source. You can also get ideas about how to implement things; this is what Open Source is all about (free availability is encouraged). I found lots of stuff via a freshmeat search, and some indirectly from it:
ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz Tons of official info: http://www.faqs.org/faqs/jpeg-faq/ Free TIFF library: ftp://ftp.sgi.com/graphics/tiff/tiff-v3.4-tar.gz For a more complete image-processing library, there is also ImageMagick, which works with many formats and platforms: http://imagemagick.sourceforge.net/ Several graphics libraries (including PNG, JPEG, TIFF) are available at: ftp://ftp.nluug.nl/pub/graphics/ImageMagick/delegates/
另外,同时找到了一个好玩的开源工程 |