|
-
May 3rd, 2012, 03:58 AM
#1
Bitmap to Jpeg converter
Hello all,
I need help, I can't find a way to convert bitmap to gif file, but in memory, not saving on disc.
I tried to convert my image using Microsoft encoder, but the image seems to be impossible to convert.
What I also tried: I created a bitmap from my metafile, save it on disc, used a tool to convert it to gif which I saved also on disc and then pass it to my report (Image.FromFile(gif file path))- and everything was fine. I receive in my report a metafile, and I need to be a gif without any disc savings.
Thanks,
Daniela
Daniela
******
I would love to change the world, but they won't give me the source code
-
May 3rd, 2012, 10:30 AM
#2
Re: Bitmap to Jpeg converter
Well, You could always temporarily save on disk the image in the wanted format, and then read its content and delete the file:
http://msdn.microsoft.com/en-us/libr...=vs.90%29.aspx
-
May 3rd, 2012, 06:54 PM
#3
Re: Bitmap to Jpeg converter
Probably MemoryStream (msdn link) might help you do this.
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
-
May 9th, 2012, 10:31 AM
#4
Re: Bitmap to Jpeg converter
Daniela,
If you want to do it like Talikag suggested, there are many libraries and utilities that perform the conversion (file to file). For example, there's a free command line tool we provide that performs image conversion among a few dozen files formats. You can find the converter here: http://www.leadtools.com/downloads/d...?category=free
However, if you want to do the conversion in memory without having to save to disk, or you require more control over the load/save, you might want to look at the commercial imaging toolkit.
Last edited by LEADTOOLS Support; May 11th, 2012 at 10:15 AM.
Reason: repaired the broken url
-
May 9th, 2012, 07:38 PM
#5
Re: Bitmap to Jpeg converter
I would advise against use of commercial image manipulation toolkits; there are plenty of fully-featured free, open-source ones. The best example is ImageMagick (http://www.imagemagick.org/script/index.php) and its C# bindings: https://imagemagick.codeplex.com/
Best Regards,
BioPhysEngr
http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|