News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Image meta data viewer

Started by jj2007, November 29, 2016, 01:32:03 PM

Previous topic - Next topic

hutch--

#30
I did a drag and drop of an image file, a PNG toolbar and it worked fine, scaled with resizing the window and ran correctly. Put an image in your next demo so that mere mortals can test it.  :P

jj2007

This is a tricky problem that goes beyond the simple gdiplus demo. What happens here is as follows:
- coder X installs Masm32 on his PC
- during this process, gdiplus.lib gets created
- when building a source with e.g. GdipCreateFromHDC, you'll see jmp near [<&gdiplus.GdipCreateFromHDC>] in the disassembly
- but where does it go?
GdipCreateFromHD   8BFF                      mov edi, edi
715082F4           55                        push ebp


Questions:
1. Does it go to 715082F2 on all Win7-64 machines?
2. Would user X normally see another entry point (jj dll != caballero dll)?
3. If coder X has a different Win7-64 machine, and thus built a different gdiplus.lib during Masm32 setup, how does that affect a gdiplus call?

I attach my \Masm32\lib\gdiplus.lib - perhaps caballero could post his version, too, and then we can check if there are any differences. It might turn out that the OS decides which DLL to use internally, maybe based on some obscure manifest setting.

Note also that my gdiplus.lib contains only the version 1.0 functions, despite the fact that my gdiplus.dll is version 1.1
Is this becauses \Masm32\include\gdiplus.inc does not contain them?
Is there a simple way to recreate gdiplus.lib with the few 1.1 functions added manually to gdiplus.inc?
If yes, what would happen if a program built with the new functions would run on WinXP, where these functions do not exist?
::)

avcaballero

Just for curiosity, I have attached a testing video here with Findley's and JJ's samples working

jj2007

Thanks, caballero. Your gdiplus.lib seems different from mine, but only for time stamps. Which means apparently that the OS decides which gdiplus.dll to use. You have a Spanish Windows version, I suppose?

avcaballero

Don't know what is exactly a Spanish Windows version. It seems that many things are English, but are showed in Spanish. For example:

Windows explorer shows: "Equipo > OSDisk (C:) > Archivos de programa >"
But if you click on the navigation bar the above dissapears and shows: "C:\Program Files"

If I try to do a ">cd Archivos de programa", it fails. What is working is ">cd Program Files"


jj2007

#35
Quote from: caballero on December 01, 2016, 11:02:37 PM
Don't know what is exactly a Spanish Windows version.

I have an Italian one. It is a real nuisance because all the useful posts in the world wide web refer to the english OS. So "Pannello di controllo" is "Control Panel" etc... and as you noted, cd C:\Programmi (x86) chokes but cd Program Files (x86) works. Inconsistent as usual - greetings to Redmond :(

P.S.: I found a nice old tool called Microsoft GIF Animator here or here (direct downloads). Useful to work on single frames, e.g. adding transparency as in the attached example (you may need to enlarge the console window to see the FrameDelay sequence for the "shooter"). I had planned to do it programmatically, but it turns out very difficult to save a multiframe GIF to file.


avcaballero

Hello. This are my entire projects, not very succesful. They all showed the gif in the computer where I haved made them, but not here :(

I have started from the Findley's example, but perhaps I missed anything. Anyway, if anyone find them useful, here are them:

- Two versions of PellesC. The first one remains in memory after closed from time to time.
- Masm version. Only show the first frame of the gif. I didn't achive to change the frame.

The window size according to the gif dimension, then you can resize it.

Regards

TWell

Do you mean that GdipLoadImageFromFile still don't work in one PC?

avcaballero

No, this function is used by John Findley and works ok. His code works in the pc where I'm sitting in front of now, mine not. Both use GdipLoadImageFromFile. I have missed anything, but I don't have time to look for it.

I am tempted to consider this computer as exotic in relation to gdi+ and gifs

TWell

You can try if SuppressExternalCodecs helpsGDIPLUSSTARTUPINPUT gdiplusStartupInput = { 1, NULL, FALSE, TRUE };

avcaballero

Ahem, did I say that Findley's program works? Well, works the 64 bits version, not the 32 bit, ie:

- 64 bits works fine
- 32 bits doesn't work (only gif, the others do)

I have changed my v1 project for 64 bits compiler, but cannot resolve the 'FrameDimensionTime'. Excluding that, it shows (in 64 bits) the fu--ing gif (only the first frame)


avcaballero


TWell

Quote from: caballero on December 06, 2016, 12:08:01 AM
I have changed my v1 project for 64 bits compiler, but cannot resolve the 'FrameDimensionTime'. Excluding that, it shows (in 64 bits) the fu--ing gif (only the first frame)
just move #include after that   #define GDIP_DEFINE_IMAGING

avcaballero


avcaballero

Several compiler solutions for and animated and simple gif viewer, 32 and 64 bits. Win32 and 64 of TinyC don't work, the api function GdipLoadImageFromFile gives an error, its two parameters seems to be ok. If anyone find a solution, please, let me know.