473,725 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Which image file formats does Image/Bitmap support?

The Image class allows loading a bitmap from a graphic file. So far I've
gotten it to work with JPG and BMP files.

What other graphic file formats are supported in this way? Is this fixed
based on the .NET Framework used (e.g., the Image class defines which
formats can be used), or can different file formats be added after-the-fact
(end-user capability in contrast to developer implementation) ?

Also, is it possible to save an image in BMP or JPG or etc. graphic formats
natively (part of the language in contrast to written code or 3rd party
stuff)?

Thanks in advance for responses!

[==Peter==]

Oct 21 '07 #1
2 2936
I am not clear which image library you are talking about. C++ does not have
any built-in keywords for image processing.
If you are talking about GDI+, yes, it is the same in System.Drawing.
If you want to extend your image format support at runtime, write your own
image processing engines as plugins.
--
Regards
Sheng Jiang
Microsoft MVP in VC++
"Peter Oliphant" <pe********@hot mail.comwrote in message
news:BA******** *************** ***********@mic rosoft.com...
The Image class allows loading a bitmap from a graphic file. So far I've
gotten it to work with JPG and BMP files.

What other graphic file formats are supported in this way? Is this fixed
based on the .NET Framework used (e.g., the Image class defines which
formats can be used), or can different file formats be added
after-the-fact (end-user capability in contrast to developer
implementation) ?

Also, is it possible to save an image in BMP or JPG or etc. graphic
formats natively (part of the language in contrast to written code or 3rd
party stuff)?

Thanks in advance for responses!

[==Peter==]
Oct 24 '07 #2
OK, sorry, I will try to be a bit clearer.

The following code will work, and successfully loads the image stored in an
image file into a Bitmap:

Bitmap^ image_bm = gcnew Bitmap( "image.JPG" ) ;

and this works as well:

Bitmap^ image_bm = gcnew Bitmap( "image.BMP" ) ;

but this DOESN'T work:

Bitmap^ image_bm = gcnew Bitmap( "image.TXT" ) ;

Thus, I know the language supports READING both JPG and BMP, and seems to do
so on every computer, thus it appears to accept these particular image file
formats natively (without having to install anything first).

What I'm interested in knowing is which OTHER image formats does this work
with? Equivalently, for which extensions .XYZ will the following also work:

Bitmap^ image_bm = gcnew Bitmap( "image.XYZ" ) ;

[==Peter=]
"Sheng Jiang[MVP]" <sh*********@ho tmail.com.discu sswrote in message
news:A7******** *************** ***********@mic rosoft.com...
>I am not clear which image library you are talking about. C++ does not have
any built-in keywords for image processing.
If you are talking about GDI+, yes, it is the same in System.Drawing.
If you want to extend your image format support at runtime, write your own
image processing engines as plugins.
--
Regards
Sheng Jiang
Microsoft MVP in VC++
"Peter Oliphant" <pe********@hot mail.comwrote in message
news:BA******** *************** ***********@mic rosoft.com...
>The Image class allows loading a bitmap from a graphic file. So far I've
gotten it to work with JPG and BMP files.

What other graphic file formats are supported in this way? Is this fixed
based on the .NET Framework used (e.g., the Image class defines which
formats can be used), or can different file formats be added
after-the-fact (end-user capability in contrast to developer
implementation )?

Also, is it possible to save an image in BMP or JPG or etc. graphic
formats natively (part of the language in contrast to written code or 3rd
party stuff)?

Thanks in advance for responses!

[==Peter==]
Oct 25 '07 #3

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

Similar topics

2
24221
by: deko | last post by:
I have a table that contains a bunch of pictures. When the user selects a particular image in a form, I need a way to extract the selected bitmap image (stored in an OLE Object table field) to the file system so the user can do stuff with "somePicture.bmp", for example. Is there an easy way to do this? Thanks in advance.
8
2032
by: Dave Quigley | last post by:
Hello everyone.... Im currently starting my targa support project again for ..NET and I am wondering if there are any particular interfaces or classes that Im supposed to extend in order to do this in a propper manner. I could try to replicate Bitmap however I believe the problem I ran into was that the base classes for images are sealed in .net so I cant inherit from them... Any suggestions would be greatly apprectiated. I may consider...
6
1443
by: Peder Y | last post by:
Surely, anyone can read it's attributes and methods... Now, how does Image store the image data? How does it discern between e.g. jpg, gif and bmp. Does it know it's own size, or does one need to save it to a stream to fetch the image size? I'm trying to save images of different formats to one single file. When I do someImage.FromStream(), will it know all the data as before, or will some be lost in some conversion process?
7
3400
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
8
1499
by: Christopher Kurtis Koeber | last post by:
Dear All, Recently I created a thread about trying to load a particular ICON image that GDI plus could not load. I realized that GDI plus definitely does not support it because it had a certain resolution that is not in any of its built in format libraries. So my question is this, how would I go about working with images that are not in GDI+ native libraries, such as raw camera files (*.RAW, etc.), Pixar's file format, and plenty of other...
1
4169
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see http://img140.imageshack.us/my.php?image=resized11wz.jpg). If I force to save in JPG format (see the commented line), then the whole shadow is a messup (see http://img70.imageshack.us/my.php?image=resized29cy.jpg). I am just wandering are there any attributes / formats...
0
1757
by: info | last post by:
For fingerprint images WSQ (Wavelet Scalar Quantization) is superior to other lossy compression methods, such as JPEG, and was chosen by FBI (U.S. Federal Bureau of Investigation) as the fingerprint image compression standard. WSQ is a lossy compression method that is well-suited for preserving the very high resolution details of grayscale images while maintaining high compression ratios of typically 12:1 to 15:1 Cognaxon WSQ image...
1
3454
by: Stedak | last post by:
I have the following class I use to save Tiff's. The problem I have with it is that the final size of the images are very large. If we scan directly to a file the final tiff may be 600-900 kb.s but with this code it is often 4000-5000 kb.s. What am I missing? public class EmrTiff : IDisposable { private string fileName; private ArrayList imageContainer = null;
8
47939
by: platinumhimani | last post by:
-How to convert any image(8,16,24,32 or 64-bit) to 8-bit grayscale -i have tried to convert a 24-bit image to grayscale using setpixel and getpixel functions, in vb.net but i am unable to save that image in grayscale format.How do i do that.It still saves in true color format. -i used picturebox1.image.save() method -i tried to convert an 8-bit image into grayscale but was unable to do it.
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9257
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
9179
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
8099
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
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.