Groups | Blog | Home
all groups > visual c > january 2007 >

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



r norman
1/27/2007 8:43:31 AM
On Sat, 27 Jan 2007 10:34:44 -0500, " Frank" <frank@a-znet.com>
[quoted text, click to view]

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
1/27/2007 8:52:44 AM
Is there and easy way to read .bmp files in native C++?

How about .jpg files?



Thanks in advance

Frank
1/27/2007 10:34:44 AM
How would I display that?


[quoted text, click to view]

Frank
1/27/2007 11:46:01 AM

[quoted text, click to view]

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.
[quoted text, click to view]

Frank
1/27/2007 11:47:40 AM
Thanks, I'll look there

[quoted text, click to view]

Frank
1/27/2007 1:15:17 PM

[quoted text, click to view]


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?




[quoted text, click to view]

Jochen Kalmbach [MVP]
1/27/2007 3:48:53 PM
Hi Frank!
[quoted text, click to view]

How about "fopen / fread"!?

Or even "CreateFile / ReadFile"?

--
Greetings
Jochen

My blog about Win32 and .NET
nathan NO[at]SPAM visi.com
1/27/2007 4:25:24 PM
In article <ewBJsphQHHA.1000@TK2MSFTNGP05.phx.gbl>,
[quoted text, click to view]

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
Jochen Kalmbach [MVP]
1/27/2007 4:36:37 PM
Hi Frank!
[quoted text, click to view]

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

See also several examples on codeproject...

--
Greetings
Jochen

My blog about Win32 and .NET
AddThis Social Bookmark Button