News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GDI+ scribble

Started by donkey, February 12, 2010, 09:09:51 AM

Previous topic - Next topic

dedndave

KB975337 gets you 5.2.6001.22319 - a security update

dedndave

this page tells you all the gdi versions for different versions of windows
http://support.microsoft.com/kb/956802

then, from that "w" site....

QuoteIn Windows Vista, all Windows applications including GDI and GDI+ applications run in the new compositing engine, Desktop Window Manager which is built atop the Windows Display Driver Model. The GDI render path is redirected through DWM and GDI is no longer hardware-accelerated by video card driver. However, due to the nature of desktop composition (internal management of moving bitmaps and transparency and anti-aliasing of GDI+ being handled at the DWM core), operations like window moves can be faster or more responsive because underlying content does not need to be re-rendered by the application.

the conclusion i am drawing is that it may not work if i did get it installed - lol
but, i would need the registry entries, cat and manifest files to install it correctly

i may play with it tomorrow
maybe i will roll my own install files   :bg

EDIT - Edgar - maybe you could export the registry entries for that version from:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations]
and post that exported reg file and the CAT file from WinSxS

donkey

Well, it seems that GDI+ 1.1 is not redistributable, you will need either Win7/Vista or install Office 2003 in order to get it. Oh well, XP users are out in the cold.

Microsoft Communities

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Quote from: donkey on February 13, 2010, 06:33:13 AM
Well, it seems that GDI+ 1.1 is not redistributable, you will need either Win7/Vista or install Office 2003 in order to get it. Oh well, XP users are out in the cold.

Edgar

that's  a pretty big oh well, considering they're many of us :) but you can cater to whom you like with your own code, i'm not a big graphic guy, I just wanted to see the latest to come out of the donkey lab, as you almost always produce quality.

donkey

Quote from: E^cube on February 13, 2010, 06:45:12 AM
that's  a pretty big oh well, considering they're many of us :) but you can cater to whom you like with your own code, i'm not a big graphic guy, I just wanted to see the latest to come out of the donkey lab, as you almost always produce quality.

Hi E^cube,

This was just a little test that I thought some would find interesting, WINVER was set to NTDDI_VISTA so the headers used that as the minimum OS, the main part of the test runs under XP as far as I know, I have no XP boxes to test on (my main XP box is down). For the effects and file functions they can easily enough be rewritten to replace the 3 functions that require 1.1. If I do decide to write an application using GDI+ you can be sure it will be completely compatible with GDI+ 1.0 and Comctl32 6.0.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

#35
OK,

I have done quite a bit of testing of gdiplus.dll files and have found one and only one that will function with XP and provides all of the new API's (version 6.0.3264.0). I have uploaded it to my website:

<File removed, you can get it from the power point viewer here>

To use it DO NOT COPY IT TO THE SYSTEM32 FOLDER !!!!

copy the DLL to the application folder and use the manifest with the <file name="gdiplus.dll"/> line instead of the one with the dependency.

That's it, works great on my XP virtual machine.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Success! thanks, interesting program  :bg

donkey

Quote from: donkey on February 13, 2010, 01:38:32 AM
There seems to be a problem when editing zoomed images, there is an artifact in the image that survives even when it is saved so it is not a problem with the zooming process but with garbage being written to the buffer returned by GdipBitmapLockBits. I can't figure out what is wrong though, this image was zoomed 4x then edited, only one pixel was drawn (a red one) then saved...



Edgar

FYI - The solution to this problem is to use the flags ImageLockModeWrite + ImageLockModeRead when locking the bitmap data, it seems that using only ImageLockModeWrite produces some undesirable results.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

dedndave

a little trip in the "Gdi+ time machine" - lol

http://www.masm32.com/board/index.php?topic=10641.0

it is about a year old and includes manifest info for Gdi+ 1.1, 6.0.3264.0, which Edgar got with PowerPoint Viewer   :P

if i could just lay my hands on that version of the PPT Viewer installer   :bg

donkey

Hi Dave,

Yeah I saw that afterward as well, seems I already figured out the solution and forgot about it. :U freakin' Alzheim...who are you ?

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

I did a bit more experimenting with GDI+ today and have solved a few of the nagging problems I had with it. Background colors for the edit window, having Alpha channel display properly etc...  GDI+ is in no way a match for the old GDI in terms of speed, its very slow so I have tried to get rid of most of the garbage calls or redundancy in the critical parts of the application but its still not possible to draw the background with any speed at all. If I try to update the background while placing a pixel or drawing a line the flashing is unacceptable so I just redraw it when there is no drawing going on. This leads to the problem that alpha values are not properly multiplied while you are drawing so a line looks solid until you release the mouse button. Could be a good thing or a bad thing, i don't like it much. Added a color palette, just some linear colors of no particular significance, I just needed a palette and wanted to do it with GDI+. Also have an Alpha channel slider that adjusts the alpha channel amplitude and some presets. The Check GDI+ button will report the version of GDI+ that was loaded.

I have commented out every function that requires GDI+ 1.1, I will not answer any questions regarding Side by Side assembly or DLL versions, that subject has been beaten to death and nobody seems to have read my tutorial on SxS so I give up. I am looking through the docs for SxS and may write an installer that will allow you to install v1.1 in the SxS folder, lots of work to do on that one though.

Source and exe are included. The manifest requires Comctl32 version 6 (the app doesn't but this demo is cut from a larger project) and any gdi+ will do.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Quote from: dedndave on February 14, 2010, 02:03:16 AM
if i could just lay my hands on that version of the PPT Viewer installer   :bg

Hi Dave,

The PPT Viewer for Office 2003 version 11.0.5703.0 has gdiplus version 6.0.3264.0 in its application folder.

This one here:

http://www.brothersoft.com/microsoft-powerpoint-viewer-2003-download-63646.html

Can't install it but a quick peek inside the archive shows gdiplus.dll 6.0.3264.0 is there. If you'd like to extract it without installing use an archive program to get the MSI from the exe file then use the following command:

msiexec /a Path to MSI file /qb TARGETDIR=Path to target folder (works on Vista anyway)

Edgar

EDIT : Be sure to run the command prompt as an administrator.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

dedndave

thanks, Edgar   :U
for XP, it installs 1.0 v 5.2.6001.22290
however, i do find the 1.1 dll inside when i manually extract it

what i want to find out is if it is possible to do a complete installation of 1.1 into XP
i know that is not what ms intended, but that doesn't mean it isn't possible   :bg
i need to poke around and see of i can find the CAT file, manifest file, and the regsitry entries

here is what i have in mind:

1) create the "C:\Windows\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.6001.22290_x-ww_f03eb54d" folder
of course, it will have a different name for Gdi+ 1.1
place the dll into that folder

2) place the manifest and security catalog (CAT) files into the "C:\Windows\WinSxS\Manifests" folder

3) create the registry keys in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations]

i do not have the information to do all that
i need the following:

1) name of the folder
2) manifest file
3) catalog file
4) registry entries for that version

if you could send me that stuff, it would make it a lot easier than trying to gleen it from extracted files - lol




donkey

#43
Hi Dave,

It should be possible using the SxS API, I would not try it manually. IAssemblyCache can be used to install and uninstall SxS assemblies but it is documented as Vista+, SxS.DLL is on XP machines though so I think its available. The interface is pretty straight-forward, something out of character for Microsoft's COM team, so it should not be a huge task to write a program to install the SxS entry for it.

Edgar

EDIT: Headers version 0x021008 has the SxS.h and fusion.h header files for side by side assembly.

Whoops, .NET stuff, but it exposes an interop COM interface, a little more complicated but not impossible.

EDIT AGAIN:

The COM interop wrapper is pretty simple:

#include "winsxs.h"
invoke CreateAssemblyCache,offset pIAssemblyCache,NULL
CoInvoke(pIAssemblyCache,IAssemblyCache.Release)
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable