Welcome, Guest. Please login or register.

Author Topic: Windows programming question...:) (png support)  (Read 1959 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Windows programming question...:) (png support)
« on: July 28, 2006, 08:32:46 PM »
:) I was asked by someone to do a small app 4 windows. I read a tutorial on windows API for people already into C and it seems more or less straighforward. Now I have a small problem. GDI doesn't support PNG (or Jpeg but I prefer PNG) decoding of graphics objects and while GDI+ does it's only available by default in XP. Actually you can use it in previous Windows versions but the thing seems to be too much C++ oriented for my taste.
So I need to choose and learn another method and I was wondering what would be the best one considering it's usability in other future projects.

Cheers
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Windows programming question...:) (png support)
« Reply #1 on: July 28, 2006, 08:52:33 PM »
Windows' support for JPEG is similar to its support for PNG. If you can't use GDI+, I would look at libpng <http://www.libpng.org/pub/png/libpng.html>. It's distributed under the zlib license, which has restrictions similar to the BSD and MIT licenses.
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show only replies by Jose
Re: Windows programming question...:) (png support)
« Reply #2 on: July 29, 2006, 12:55:05 AM »
Amiga datatypes come to mind..

I was googling about using it in Win2k and found some previous GDI+ version(s?) had a flaw that allowed to execution of code from malicious jpeg images :roflmao:

Anyway, before GDI+ how did most developers support jpeg and png etc., did M$ provided some standard lib ? I find it hard to believe they only added support for that after XP :-o

Checking libpng right now...
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
Re: Windows programming question...:) (png support)
« Reply #3 on: July 29, 2006, 01:32:09 AM »
Quote

Jose wrote:

Anyway, before GDI+ how did most developers support jpeg and png etc., did M$ provided some standard lib ? I find it hard to believe they only added support for that after XP :-o


Intel has/had a good JPEG library.  I used it to convert from DIB to JPEG for a project about 10 years ago.  :-D  (I don't think PNG existed back then even.)

Time to move on.  Bye Amiga.org.  :(
 

Offline Trev

  • Hero Member
  • *****
  • Join Date: May 2003
  • Posts: 1550
  • Country: 00
    • Show only replies by Trev
Re: Windows programming question...:) (png support)
« Reply #4 on: July 31, 2006, 09:28:16 PM »
Quote
Amiga datatypes come to mind..


Yeah, datatypes are cool. There's nothing similar in the Windows Platform SDK.

Quote
I was googling about using it in Win2k and found some previous GDI+ version(s?) had a flaw that allowed to execution of code from malicious jpeg images


As opposed to Amiga OS, which offers no protection from malicious code whatsoever? ;-) Software is inherently flawed. . . .

Quote
Anyway, before GDI+ how did most developers support jpeg and png etc., did M$ provided some standard lib ? I find it hard to believe they only added support for that after XP


By reading up on the file specs and supporting them natively? Or as adolescent said, by using a third party library. GDI was designed to put bitmap data on the screen. I don't think Microsoft much cared how you stored the data itself.