I need hints for jpg,png,gif -> bmp conversion!
-
Hi everybody! :) I have some libs that do the conversions already, I guess most of you guys have them as well. The Intel's ijl11 lib, the SmallerAnimals JpegLib and the cimage lib. O.K., but one thing common with all of them is that they read the contents of the image file loaded into the view, not as an offline or behind the scene conversion if you know what I mean? :) What I need is to setup a routine which would load files like JPG, PNG, GIF from the HD, convert to BMP and then save the same as a BMP file, back to HD which then the same BMP will be loaded into my application for usage. All that must be behind the scene, no loading to view the converting file is required. The part of loading files, saving them and loading again the BMP are all done except the Offline Conversion! This is where I need help! :) Hope any one help with this! :) Thnks in advance, Masoud
-
Hi everybody! :) I have some libs that do the conversions already, I guess most of you guys have them as well. The Intel's ijl11 lib, the SmallerAnimals JpegLib and the cimage lib. O.K., but one thing common with all of them is that they read the contents of the image file loaded into the view, not as an offline or behind the scene conversion if you know what I mean? :) What I need is to setup a routine which would load files like JPG, PNG, GIF from the HD, convert to BMP and then save the same as a BMP file, back to HD which then the same BMP will be loaded into my application for usage. All that must be behind the scene, no loading to view the converting file is required. The part of loading files, saving them and loading again the BMP are all done except the Offline Conversion! This is where I need help! :) Hope any one help with this! :) Thnks in advance, Masoud
I presume by CImage you mean the CImage 1.4 library in Julian Smart's Code Cupboard at http://www.anthemion.co.uk? I used it a little while ago to do exactly what you describe - I created a CImage object from a file, and saved it to another in a different format (JPG to BMP in my case). I didn't need to load the image into a view to do the conversion, so maybe you have a different CImage library? Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net)
http://www.resorg.co.uk"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
-
Hi everybody! :) I have some libs that do the conversions already, I guess most of you guys have them as well. The Intel's ijl11 lib, the SmallerAnimals JpegLib and the cimage lib. O.K., but one thing common with all of them is that they read the contents of the image file loaded into the view, not as an offline or behind the scene conversion if you know what I mean? :) What I need is to setup a routine which would load files like JPG, PNG, GIF from the HD, convert to BMP and then save the same as a BMP file, back to HD which then the same BMP will be loaded into my application for usage. All that must be behind the scene, no loading to view the converting file is required. The part of loading files, saving them and loading again the BMP are all done except the Offline Conversion! This is where I need help! :) Hope any one help with this! :) Thnks in advance, Masoud
WE use paintlib (www.paintlib.de) and I personally used it to convert jpg to bmp to disk. There is no reason you couldn't use it to do everything you mention, and I find it the best free image library, not least because it is under continued development. Christian The content of this post is not necessarily the opinion of my yadda yadda yadda. To understand recursion, we must first understand recursion.
-
Hi everybody! :) I have some libs that do the conversions already, I guess most of you guys have them as well. The Intel's ijl11 lib, the SmallerAnimals JpegLib and the cimage lib. O.K., but one thing common with all of them is that they read the contents of the image file loaded into the view, not as an offline or behind the scene conversion if you know what I mean? :) What I need is to setup a routine which would load files like JPG, PNG, GIF from the HD, convert to BMP and then save the same as a BMP file, back to HD which then the same BMP will be loaded into my application for usage. All that must be behind the scene, no loading to view the converting file is required. The part of loading files, saving them and loading again the BMP are all done except the Offline Conversion! This is where I need help! :) Hope any one help with this! :) Thnks in advance, Masoud
You mentioned Smaller Animals' JpegLib - you might want to take a look at our ImgSource package, too. It does JPG, BMP, TIFF, PNG, PCX, etc.. it can handle I/O from disk, memory or with a set of I/O callback functions. source is available, too. -c (Smaller Animals Software)
-
I presume by CImage you mean the CImage 1.4 library in Julian Smart's Code Cupboard at http://www.anthemion.co.uk? I used it a little while ago to do exactly what you describe - I created a CImage object from a file, and saved it to another in a different format (JPG to BMP in my case). I didn't need to load the image into a view to do the conversion, so maybe you have a different CImage library? Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net)
http://www.resorg.co.uk"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
Dear Andy, Hi and thanks for your reply. I checked the version in the help file and is this: July 18th 1998, Verson 1.4 Julian Smart julian.smart@ukonline.co.uk http://web.ukonline.co.uk/Members/julian.smart Right now am online checking his new site and gonna see what's new to download. If it's the same as yours, I would like to request a further example of how it is done with a list of about 400 images loaded into a list box! :) I have setup a filte so a user could select what image extension to be loaded. For example is this way gonna work: //*********************** // In the header CImage *m_pImage; // In the constructor m_pImage = 0; // And somewhere in the cpp int images_count = m_ListDib.GetCount(); for (int i=0; i<=images_count; i++) { m_ListDib.GetText(i, imgName); // Construct a new CImage object. m_pImage = new CImage(imgName.GetBuffer(128)); ASSERT_VALID(m_pImage); if (!pImage->IsOK()) { AfxMessageBox("Could not create CImage"); delete pImage; m_pImage = 0; return; } . . . // Call the conversion function here? // Without having to load them into the view! . . . } //*********************** Forgive me for the code format, I just typed in here. Looking ahead to your reply. Thanks in advance. Cheers Masoud
-
You mentioned Smaller Animals' JpegLib - you might want to take a look at our ImgSource package, too. It does JPG, BMP, TIFF, PNG, PCX, etc.. it can handle I/O from disk, memory or with a set of I/O callback functions. source is available, too. -c (Smaller Animals Software)
I use ImgSource. I it is good stuff and does more than mensioned by Chris. Happy programming!!
-
Hi everybody! :) I have some libs that do the conversions already, I guess most of you guys have them as well. The Intel's ijl11 lib, the SmallerAnimals JpegLib and the cimage lib. O.K., but one thing common with all of them is that they read the contents of the image file loaded into the view, not as an offline or behind the scene conversion if you know what I mean? :) What I need is to setup a routine which would load files like JPG, PNG, GIF from the HD, convert to BMP and then save the same as a BMP file, back to HD which then the same BMP will be loaded into my application for usage. All that must be behind the scene, no loading to view the converting file is required. The part of loading files, saving them and loading again the BMP are all done except the Offline Conversion! This is where I need help! :) Hope any one help with this! :) Thnks in advance, Masoud
You surely know ImageMagick (www.imagemagick.org), that is even used by Microsoft. Uwe Keim http://www.zeta-software.de