473,626 Members | 3,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any 3RD Party sources to save Bitmaps to graphic files?

I would like to be able to save a Bitmap to a graphic file, such as a JPG,
BMP, etc. Are there any 3rd party sources that provide a means to put this
functionality into my VS C++ 2008 application in /CLI mamaged mode? I'd
prefer not to write the conversions.

Also, is there a place I can find the BMP and JPG file format standards?
Nov 14 '07 #1
3 1134
"Peter Anthony" <po*******@roun dtripllc.comwro te in message
news:u$******** ********@TK2MSF TNGP05.phx.gbl. ..
>I would like to be able to save a Bitmap to a graphic file, such as a JPG,
BMP, etc. Are there any 3rd party sources that provide a means to put this
functionalit y into my VS C++ 2008 application in /CLI mamaged mode? I'd
prefer not to write the conversions.
There's lots of 3rd party libraries available.

Built in to Windows, there's GDI+.
http://msdn2.microsoft.com/en-us/library/ms533798.aspx

The .NET System.Drawing namespace has classes which wrap the GDI+ classes.
http://msdn2.microsoft.com/en-us/lib...m.drawing.aspx
>
Also, is there a place I can find the BMP and JPG file format standards?
For JPEG, Google "JPEG file format" and/or "JPEG JFIF"

A typical (packed) BMP file is a BITMAPFILEHEADE R struct followed by a
BITMAPINFO struct followed by the color table (if appropriate) followed by
the pixel data. http://msdn2.microsoft.com/en-us/library/ms532311.aspx

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++
>
Nov 14 '07 #2
Thanx Mark!

I also discovered that Wikipedia also details image file formats! Pretty
cool! :)

"Mark Salsbery [MVP]" <MarkSalsbery[MVP]@newsgroup.nosp amwrote in message
news:6E******** *************** ***********@mic rosoft.com...
"Peter Anthony" <po*******@roun dtripllc.comwro te in message
news:u$******** ********@TK2MSF TNGP05.phx.gbl. ..
>>I would like to be able to save a Bitmap to a graphic file, such as a JPG,
BMP, etc. Are there any 3rd party sources that provide a means to put this
functionali ty into my VS C++ 2008 application in /CLI mamaged mode? I'd
prefer not to write the conversions.

There's lots of 3rd party libraries available.

Built in to Windows, there's GDI+.
http://msdn2.microsoft.com/en-us/library/ms533798.aspx

The .NET System.Drawing namespace has classes which wrap the GDI+ classes.
http://msdn2.microsoft.com/en-us/lib...m.drawing.aspx
>>
Also, is there a place I can find the BMP and JPG file format standards?

For JPEG, Google "JPEG file format" and/or "JPEG JFIF"

A typical (packed) BMP file is a BITMAPFILEHEADE R struct followed by a
BITMAPINFO struct followed by the color table (if appropriate) followed by
the pixel data. http://msdn2.microsoft.com/en-us/library/ms532311.aspx

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++
>>

Nov 14 '07 #3
If you're willing to call out to unmanaged code, here are two ways.

CxImage
http://www.xdp.it/download.htm
http://www.codeproject.com/bitmap/cximage.asp

CImage
http://msdn2.microsoft.com/en-us/lib...y5(VS.80).aspx
"Peter Anthony" <po*******@roun dtripllc.comwro te in message
news:u$******** ********@TK2MSF TNGP05.phx.gbl. ..
>I would like to be able to save a Bitmap to a graphic file, such as a JPG,
BMP, etc. Are there any 3rd party sources that provide a means to put this
functionalit y into my VS C++ 2008 application in /CLI mamaged mode? I'd
prefer not to write the conversions.

Also, is there a place I can find the BMP and JPG file format standards?
Nov 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2637
by: Mark Johnson | last post by:
How can you save all or a portion of the Grafics object to a Image/Bitmap ? I am try to save the Images from Cards.dll to a BitMap file. I can read in the Images to the Grafics, but when I try this with a Bitmap the results are Black. Can you somehow Clip the Grafic and Paste it into the Bitmap ? Mark Johnson, Berlin Germany mj10777@mj10777.de
2
1881
by: TC | last post by:
I would like to save bitmaps to a file stream, but I can't get the Bitmap.Save(Stream) overload to work. If I save one bitmap to the stream, it works okay, but if I save two or more, they all become garbled. I saw another post where someone questioned whether there is a bug, but there was no definitive answer. So, how about it? Does Bitmap.Save(Stream) work the way it is supposed to? -TC
13
1531
by: Stacey Levine | last post by:
Ok.. Maybe I am trying the wrong approach. If given a URL to a graphic, I want to save that graphic to a local file. The approach below gets the response, but I can't quite figure out how to save it to a file. In this instance, a file gets created but it only contains the text "System.Io.StreamReader" I have also tried writer.write(reader.ReadToEnd), but the file still displays nothing. Dim URL As String = GraphicURL
1
5699
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out of a Microsoft book, "Visual Basic,Net Step by Step" in Chapter 18. All but the bottom two subroutines will open a text file, and then allow me to use the above controls, example 1. The bottom two subroutines will print a graphic file, example...
2
2065
by: Mike | last post by:
Hello everybody. I am drawing a country map that consists of 149 municipality bitmaps, each around 25 Kb. I draw it onto the in-memory bitmap, then draw it on the picture box. I use C++, but anyways if I were using the C# the question would be the same. And here is the problem: it takes 700 ms to draw it, and anything above 300 ms is noticable by the human eye. So, is there any technique that I could use to actually keep the bitmaps in...
1
1682
by: Luis Arvayo | last post by:
Hi, I hope this is the correct place for this post. What is your favourite graphic tool for building the glyphs/images/icons on toolbars ?. Photoshop, PaintShop Pro, or ?. I mean 16x16 or 24x24 - 24 bit bitmaps to use on toolbars. Some can be obtained on internet freeware or shareware, but with custom needed glyphs it is not possible, and I need a lot of them.
1
1659
by: bdtmike | last post by:
This is a newbie question: I've got VS2005 installed on my PC. This is the premier development environment for the latest & greatest application. Dumb Question: How come it comes with no graphic libraries, icons, backgrounds, gradients, etc, etc? Is it somewhere hiding that I didn't see? Right now I've got plain grey forms, buttons, etc...just like good ol' VB6. I want to make my app look a little more appealing. I know it's...
2
1824
by: Marcus | last post by:
Good evening, I'm new to developing large subversion-controlled projects. This one will involve a few third-party libraries like wxWidgets, and perhaps Twisted. Ordinarily you could just install these into your system and they'll end up globally (in Python's Lib/site-packages directory). Is it proper practice to instead install the libraries into a separate of the repository and reference that instead? I've read about vendor branches,...
0
907
by: TC | last post by:
Hi all. I have a project at the moment that requires the production of Datamatrix bar codes, saved as graphics. I'm saving a Metafile as this is a vector type file should map better to the printers being used in terms of DPI. The problem I have is the files seem to be saved as colour files, although the only colours in the graphic (for obvious reasons) are black and white. I've been through all the Imaging.PixelFormats, but can't see...
0
8272
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8713
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8644
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8370
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8514
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7206
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2632
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.