Image drawn mirrored - wxWidgets or UserError?

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
thile
Knows some wx things
Knows some wx things
Posts: 26
Joined: Sat Oct 25, 2008 3:46 pm

Image drawn mirrored - wxWidgets or UserError?

Post by thile » Thu Feb 12, 2009 9:12 am

Hi, I’m experimentation with making an application support Right to Left layout.

I used this call SetProcessDefaultLayout (LAYOUT_RTL);

To flip all windows made by my main process. More info is available here.
http://msdn.microsoft.com/en-us/goglobal/bb688119.aspx
I noticed that my images are mirrored also. That was not indented.


I decided to test on a smaller and simpler application, so I used the Sample wxImage application.

Here is some footage.

Here is the application directory with the images it uses. Notice how the images look.
Image


Next up the application. Whoo, the images look ok, all images are drawn as I hoped for.
Image


Ok, in the application there is an option to show any image. I will now use this to show a jpeg and a gif file.

Here are the images. They are the same, just one in gif, and the other jpeg.
Image


Now see how jpeg image is drawn. Looks ok.
Image


Now here is the gif – why???
Image



Mostly all my gifs go like this. Except the one gif that is used in the application itself. Look if I open up the horse.gif
Image

thile
Knows some wx things
Knows some wx things
Posts: 26
Joined: Sat Oct 25, 2008 3:46 pm

code sample

Post by thile » Wed Mar 04, 2009 2:04 pm

I have zipped the sample project together with the two images.

I hope someone else will try, and see if the same behaviour occurs.

http://peecee.dk/upload/download/158158

thile
Knows some wx things
Knows some wx things
Posts: 26
Joined: Sat Oct 25, 2008 3:46 pm

Post by thile » Wed Mar 04, 2009 2:16 pm

The picture IMG_6383_1.gif was created from the original jpeg file.

I did open the jpeg file, and did a "save as" and selected gif format.
And these pictures turn up mirrored in the wxapplication...

Now I open up the IMG_6383_1.gif again i my image editor. I again choose "save as" and save it as IMG_6383_2.gif

Guess what, this picture does not mirror.

Conversion from jpeg -> gif -> turns up mirrored.
Conversion from gif -> gif -> turns up ok.

??????

computerquip
Experienced Solver
Experienced Solver
Posts: 72
Joined: Fri Feb 20, 2009 7:13 pm
Location: $(#wx)\src

Post by computerquip » Wed Mar 04, 2009 2:45 pm

>.> Even while reading, I only understand a percentage of what your saying. You didn't really seem to have a question in your first three posts or did I miss something?

Post Reply