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++ / January 2007

Tip: Looking for answers? Try searching our database.

Is there and easy way to read .jpg and/or .bmp files in native C++?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank - 27 Jan 2007 13:52 GMT
Is there and easy way to read .bmp files in native C++?

How about .jpg files?

Thanks in advance
Jochen Kalmbach [MVP] - 27 Jan 2007 14:48 GMT
Hi Frank!
> Is there and easy way to read .bmp files in native C++?
>
> How about .jpg files?

How about "fopen / fread"!?

Or even "CreateFile / ReadFile"?

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Frank - 27 Jan 2007 15:34 GMT
How would I display that?

> Hi Frank!
>> Is there and easy way to read .bmp files in native C++?
[quoted text clipped - 4 lines]
>
> Or even "CreateFile / ReadFile"?
r norman - 27 Jan 2007 15:43 GMT
>> Hi Frank!
>>> Is there and easy way to read .bmp files in native C++?
[quoted text clipped - 6 lines]
>>
>How would I display that?

Oh, that is a different question.  You should have asked that the
first time!

What do mean by "native C++".  Do you mean you have to write you own
code pixel by pixel?  You can't display anything on a screen in
"native C++" without using somebodies library routines and there are
numerous jpg and bmp display libraries available that you can call
from native C++.  Have you tried google?
Frank - 27 Jan 2007 16:46 GMT
>>> Hi Frank!
>>>> Is there and easy way to read .bmp files in native C++?
[quoted text clipped - 15 lines]
> numerous jpg and bmp display libraries available that you can call
> from native C++.

Thanks, that's what I needed. Nothing in VS2005.

Have you tried google?

I'm such a novice I think I could easily spend much time trying things.
Jochen Kalmbach [MVP] - 27 Jan 2007 15:36 GMT
Hi Frank!
> Is there and easy way to read .bmp files in native C++?
>
> How about .jpg files?

Or are you looking for something like
- LoadImage (at least for BMP)
- OleLoadPicture / OleCreatePictureIndirect
- GDI+: Bitmap::FromFile
?

See also several examples on codeproject...

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Frank - 27 Jan 2007 16:47 GMT
Thanks, I'll look there

> Hi Frank!
>> Is there and easy way to read .bmp files in native C++?
[quoted text clipped - 8 lines]
>
> See also several examples on codeproject...
Nathan Mates - 27 Jan 2007 16:25 GMT
>Is there and easy way to read .bmp files in native C++?
>How about .jpg files?

  Read/write? Try http://openil.sourceforge.net . Displaying is
another matter, because C/C++ doesn't have graphics as part of the
language. You'll need to find a different library that does that.

Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/ 
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Frank - 27 Jan 2007 18:15 GMT
>>Is there and easy way to read .bmp files in native C++?
>>How about .jpg files?
>
>   Read/write? Try http://openil.sourceforge.net . Displaying is
> another matter, because C/C++ doesn't have graphics as part of the
> language. You'll need to find a different library that does that.

I thought once I had the files data into a BITMAP I could  SelectBitmap it
into a device context and the BitBlt it to whatever.

No?

> Nathan Mates
> --
[quoted text clipped - 3 lines]
> # think. What are the facts, and to how many decimal places?" -R.A.
> Heinlein

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.