Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2007

Tip: Looking for answers? Try searching our database.

Which image file formats does Image/Bitmap support?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Oliphant - 21 Oct 2007 03:29 GMT
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==]
Sheng Jiang[MVP] - 24 Oct 2007 01:58 GMT
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.

Signature

Regards
Sheng Jiang
Microsoft MVP in VC++

> The Image class allows loading a bitmap from a graphic file. So far I've
> gotten it to work with JPG and BMP files.
[quoted text clipped - 12 lines]
>
> [==Peter==]
Peter Oliphant - 25 Oct 2007 02:30 GMT
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=]

>I am not clear which image library you are talking about. C++ does not have
>any built-in keywords for image processing.
[quoted text clipped - 18 lines]
>>
>> [==Peter==]
Ben Voigt [C++ MVP] - 26 Oct 2007 18:25 GMT
> OK, sorry, I will try to be a bit clearer.
>
[quoted text clipped - 14 lines]
> do so on every computer, thus it appears to accept these particular image
> file formats natively (without having to install anything first).

This isn't "the language".  It is the library that provides graphics
support, including support for different image file formats.  Perhaps you
are wanting to know what support is included in the library which is
installed by the .NET Framework (this is called the Microsoft Base Class
Libraries, or BCL)?

Sheng has indicated that the BCL simply uses GDI+ for all its image file
I/O, so you would refer to the GDI+ documentation to learn the capabilities
and limitations.  See http://msdn2.microsoft.com/en-us/library/ms536316.aspx

"The graphics file formats supported by GDI+ are BMP, GIF, JPEG, PNG, TIFF,
Exif, WMF, and EMF."

> What I'm interested in knowing is which OTHER image formats does this work
> with? Equivalently, for which extensions .XYZ will the following also
[quoted text clipped - 26 lines]
>>>
>>> [==Peter==]
Peter Oliphant - 26 Oct 2007 21:51 GMT
"The graphics file formats supported by GDI+ are BMP, GIF, JPEG, PNG, TIFF,
Exif, WMF, and EMF."

Which is precisely the answer I was looking for. Thanx! :)

[==Peter==]

>> OK, sorry, I will try to be a bit clearer.
>>
[quoted text clipped - 59 lines]
>>>>
>>>> [==Peter==]

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.