View previous topic :: View next topic |
Author |
Message |
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Mar 27, 2008 6:43 pm Post subject: Want PNG Support? |
|
|
Is PNG support pretty important at this point?
I can get PNG support with GDI+ and a different Picture implementation.
Things to consider:
GDI+ won't work on Windows 95, and doesn't come with 98, Me or 2000.
For better compatibility, it might be better to have a separate Picture class for GDI+, and keep the current one as well; but also have a compile-time switch to turn the regular Picture into the GDI+ one if desired.
If going with a separate class, what will it be named?
Or, just load GDI+ in Picture if available, falling back to the current one if no GDI+. This has down sides: GDI+ does things better, so different users will get different results; and it could bloat Picture a bit.
Could be a combination of all the above. |
|
Back to top |
|
|
Al
Joined: 10 Mar 2008 Posts: 9
|
Posted: Fri Mar 28, 2008 7:43 am Post subject: |
|
|
I would describe PNG support as "somewhat important" for me ATM.
Meaning, I can survive without it, but having PNG supported would be nice (mainly for it's alpha channel capabilities).
As for the way to do it.. It would be nice to have a single class and auto-everything, I guess - having to check if the OS is GDI+ capable or not each and every time you need to create a Picture/PicturePlus (a GDI+ aware Picture ) would be bothersome, even if we're talking about checking a single bool flag here.
So, how about adding GDI+ support to the Picture class, but providing it with "bool dontUseGdiPlus" property, which would make the Picture rely on GDI only? (or something like this)
I don't think the bloat is going to be that significant, is it? |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Mar 28, 2008 9:45 pm Post subject: |
|
|
You have good points; I might do it that way. |
|
Back to top |
|
|
HateWork
Joined: 20 Oct 2007 Posts: 13
|
Posted: Tue Apr 01, 2008 8:28 pm Post subject: |
|
|
I think there's already a D port for png, or at least an import file for the dll but in this case all dfl programmers must include the png dll with their program.
I hope you get the idea. |
|
Back to top |
|
|
Al
Joined: 10 Mar 2008 Posts: 9
|
Posted: Wed Apr 02, 2008 10:53 am Post subject: |
|
|
Well.. sure, you CAN use whatever lib you've got for png.
You can even write png-loading/drawing code yourself!
But the question was: does anyone need built-in png support in DFL (using Picture/Picture-based class), AFAIK |
|
Back to top |
|
|
HateWork
Joined: 20 Oct 2007 Posts: 13
|
Posted: Mon May 05, 2008 5:40 pm Post subject: |
|
|
PNG support is more than important at this point.
Quote: | But the question was: does anyone need built-in png support in DFL (using Picture/Picture-based class), AFAIK |
I do! Create a poll please! |
|
Back to top |
|
|
|