FireImage Control in FireSplitter Control Problem

Started by Martin Francom, December 22, 2009, 08:05:32 PM

Previous topic - Next topic

Martin Francom

Paul,
   It may be my miss understanding but I am having a problem
getting a jpg file to display in a Fireimage control when that
control in located on a form displayed in a FireSpliter Control.
   Note the image displays in the FF editor.
   I have attached a small project that demostrates the problem.
Where am I going wrong?

   

Cho Sing Kum

Marty,

I ran your project and can see ASlogo.JPG in Form3.

I ran both your compiled exe and a fresh compile on my pc.

Martin Francom

Interesting...
What version of windows are you using?
I am using Windows-7.
Maybe it's a Windows specific problem.
I have an old XP computer. I will try it on that.

Cho Sing Kum

#3
Windows XP SP3
AMD Athlon64 X2 5200+
4 GB RAM
nVidia 8800 GTS 320 MB
nVidia Driver 191.07

Rolf Brandt

Marty,

works fine with me. Same configuration as Cho Sin Kum.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

On my Win7 laptop I can't see the graphic but on my WinXP computer I can see it. Weird.
Paul Squires
PlanetSquires Software

Rolf Brandt

Windows 7 Ultimate Release Candidate:
Form4 shows the graphic.
Form3 does not.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

The grpahic on Form4 is a standard picture control with a bitmap. The graphic on Form3 is the FireImage control with a jpg - that is the one that does not show when viewed in Win7. I will try something later that may be related to the problem - it may be a long shot but you never know.
Paul Squires
PlanetSquires Software

Martin Francom


Paul Squires

Not yet. I have done very little programming over Christmas.
Paul Squires
PlanetSquires Software

Martin Francom

Any ideas about this jpg image display problem?

Paul Squires

Based on the few tests that I have run, the images work perfectly when loaded from a disk file but fail when loaded from the resource file. This is why in Win7 you see the image in the FireFly designer because FF loads the image from disk. In the compiled exe the image is attempted to be loaded from the resource file.

I now need to determine why loading from the resource file fails on Win7 but not on WinXP.
Paul Squires
PlanetSquires Software

Paul Squires

Looks like at least someone else is having the same problem: http://stackoverflow.com/questions/1902987/gdipcreatebitmapfromstream-change-of-contract-on-windows-7

"We have a perfectly functional app that just broke on Windows 7 because (the GDI+ primitive) GdipCreateBitmapFromStream refuses JPEG images presented to it (without problem on XP and even Vista)."

Granted, the code they are using is C++ and it means mostly gibberish to me.

Here is the response post which I guess provides a solution:

"Further research reveals that W7 queries an additional optional interface on the stream, and it's essential to return E_NOINTERFACE instead of E_NOTIMPL for it."

Now, if only I had half a clue what that means.......  :)


Paul Squires
PlanetSquires Software

Roger Garstang

Haven't done much with Classes/COM/Interfaces even though PB now supports it.  Sounds like another Interface expecting that type is needed.  Out of my area, although I plan to know more on it at some point.  Isn't stuff like that Jose's area?  He probably already has something for it.

Paul Squires

The majority of the code is from Jose's image controls from his site. Everything worked perfectly until Windows 7. Bummer.
Paul Squires
PlanetSquires Software