GDI+ 1.1

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

GDI+ 1.1

Post by srod »

Hi,

on Vista and Win 7, GDI+ 1.0 and 1.1 are installed side-by-side. However, on Vista at least, getting access to version 1.1 requires additional entries to be made in the applications manifest file. I presume the same is true for Win 7.

Any chance that the IDE could have the option (compiler options) of requesting support for version 1.1 of GDI+, similar to the "Enable XP themes support" etc?

An example of such an entry for x86 is :

Code: Select all

<assemblyIdentity name="Microsoft.Windows.GdiPlus" version="1.1.6000.16386" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" type="win32" />
Thanks.
I may look like a mule, but I'm not a complete ass.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: GDI+ 1.1

Post by Mistrel »

Is this something that would be used often enough to warrant adding it to the IDE? I for one didn't even know there were different versions of GDI+.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GDI+ 1.1

Post by srod »

Well, I'm not talking about adding it to the IDE as such, but having the IDE offer GDI+ 1.1 support to our own applications via the usual compiler options etc.

GDI+ 1.1 has some nice additions for sure; e.g. converting between image formats such as converting from a 32-bit BMP to an 8 bit indexed one via quite a number of possible dithering algorithms.
I may look like a mule, but I'm not a complete ass.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: GDI+ 1.1

Post by Fluid Byte »

+1
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: GDI+ 1.1

Post by freak »

This is not something that most users will need, so having an option is overkill.

You should be able to just add your own manifest as a resource, so you can specify whatever you want.
quidquid Latine dictum sit altum videtur
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GDI+ 1.1

Post by srod »

No problem if an exe can have embedded within in it multiple manifest files Timo, but I am not sure that this is the case since, for example, a file based manifest alongside the exe will take priority over one embedded within the resource section of the exe!

If it is indeed not possible to use multiple manifests then, well, in the case of a one-off application, no problem. In the case of a library making use of GDI+ 1.1 however, users would then have to create their own manifests for different host programs depending on whether they required XP themes and/or admin rights and so on since any additional manifest file will then render the one added by the IDE null and void! :)

I just thought it would be easier all round to extend the IDE's compiler options dialog etc. and thus be able to stick to a single manifest file without any hassle. As I say I am unsure whether multiple manifest files can be used by a single exe? Do you happen to know if this is the case?
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GDI+ 1.1

Post by srod »

@Timo :

it is as I feared. I added an additional resource file containing the required manifest which linked in version 1.1 of GDI+ and that worked fine. However, the new manifest appears to over-write the one which the IDE adds when I opt for XP themes and the like through the IDE. As I say, adding single manifest files to cover all combinations of XP themes and/or admin mode and/or GDI+ 1.1 support etc. will be tricky for use with a generic library for use by others etc.

It would be easier through the IDE compiler options. :wink:
I may look like a mule, but I'm not a complete ass.
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: GDI+ 1.1

Post by freak »

Well, i find it kind of weird to add an option that has no connection to any component of PB and only effects some API stuff that the large majority of users will never use.
quidquid Latine dictum sit altum videtur
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GDI+ 1.1

Post by srod »

I understand. All I can add is that I think more and more people will eventually start looking towards GDI+ instead of using GDI and, if that happens, GDI+ 1.1 is the place to be considering not only it's new features, but the fact that it fixes many vulnerabilities inherent in version 1.0. I also hope the damn thing is faster than 1.0. :)

How about some facility for manually adding entries to the manifest file through the IDE options instead?
I may look like a mule, but I'm not a complete ass.
freak
PureBasic Team
PureBasic Team
Posts: 5946
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: GDI+ 1.1

Post by freak »

> How about some facility for manually adding entries to the manifest file through the IDE options instead?

That sounds like a good solution.
quidquid Latine dictum sit altum videtur
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: GDI+ 1.1

Post by srod »

Perhaps this can be offered in a similar way to the optional linker files and .rc files which we can add through the IDE compiler options. Say a 'Manifest dependecies file' which can just be a basic .xml or text file which can be added to the manifest built by the IDE. It'd work for me! :)

If I read certain posts through the web correctly, VC++ offers this kind of thing : "Project Properties dialog --> Configuration Properties --> Linker --> Manifest File --> Additional Manifest Dependencies".

Anyhow, thanks for your replies. Much appreciated.
I may look like a mule, but I'm not a complete ass.
Post Reply