What is the purpose of defining "wxBITMAP_TYPE_JPEG_RESOURCE" ? Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
tomay3000
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Mon Apr 24, 2017 4:23 am

What is the purpose of defining "wxBITMAP_TYPE_JPEG_RESOURCE" ?

Post by tomay3000 »

Hello,
I have seen that wxBITMAP_TYPE_JPEG_RESOURCE has been declared in the gdicmn.h File as BitmapType enumeration.
So I have tried to use it to load a JPEG file embedded in the RCDATA resource without success :(

Code: Select all

LoadFile(wxT("image1"), wxBITMAP_TYPE_JPEG_RESOURCE);
I have digged a little bit into the source code, and have found NO implementation to it :(
So, what is the purpose of defining it ?, is it for future use ?

What is the proper/easy way of loading JPEG embedded files in RCDATA ?

Thank you for your help.
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: What is the purpose of defining "wxBITMAP_TYPE_JPEG_RESOURCE" ?

Post by doublemax »

Use the source, Luke!
tomay3000
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Mon Apr 24, 2017 4:23 am

Re: What is the purpose of defining "wxBITMAP_TYPE_JPEG_RESOURCE" ?

Post by tomay3000 »

doublemax wrote:https://wiki.wxwidgets.org/Embedding_PN ... ource_file

Should work the same for JPGs.
Meaning it was not implemented for resource types other than BMP, ICO and PNG.

So I have to do it the hard way as explained in the link you provided.
Post Reply