Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: Anyone know anything about PNG files?  (Read 1997 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Anyone know anything about PNG files?
« on: April 08, 2013, 09:23:55 PM »
0
I redirect you to this topic on the GMC forums:
http://gmc.yoyogames.com/index.php?showtopic=577017

I ran a simple code that just changed 9 bytes of the palette in a PNG file. The file is still readable by Paintshop Pro and that little Windows Picture Viewer program. I think even web browsers can read it. However, GameMaker can't read the file AT ALL after I've run it through my palette swap code. I think this is only an issue for PNG files, but I don't know why. Anyone here have enough know-how to provide me some insight?
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Lelygax

  • The Wanderer
  • Master Hunter
  • *****
  • Posts: 4552
  • Its useless, its all useless.
  • Awards 2017-07-Sprite Contest First Place Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Castlevania: Harmony of Dissonance (GBA)
  • Likes:
Re: Anyone know anything about PNG files?
« Reply #1 on: April 09, 2013, 08:35:31 AM »
0
Try it with GIF and BMP too, so you will know for sure if this happens only in PNG.
(click to show/hide)
Hau auu~     

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Anyone know anything about PNG files?
« Reply #2 on: April 09, 2013, 10:29:21 PM »
0
I can load an edited GIF file. That worked just fine, which leads me to believe that the PNG issue has to do with the CRC data in the PNG file. If my theory is correct, I would need to edit that as well in order to allow PNG files to be reloaded into Game Maker.

So can anyone here explain to me how the CRC for a PNG file is calculated exactly?
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Lelygax

  • The Wanderer
  • Master Hunter
  • *****
  • Posts: 4552
  • Its useless, its all useless.
  • Awards 2017-07-Sprite Contest First Place Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Castlevania: Harmony of Dissonance (GBA)
  • Likes:
Re: Anyone know anything about PNG files?
« Reply #3 on: April 10, 2013, 12:53:12 AM »
0
I dont know even how they calculate it in a RAR file lol
(click to show/hide)
Hau auu~     

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Anyone know anything about PNG files?
« Reply #4 on: April 11, 2013, 09:39:39 PM »
0
Okay, I verified it's a CRC issue. I figured out how to find the palette in ANY PNG file (always preceded by the same code, it seems). And I found the palette's CRC. But I have no fucking clue how to translate it. So fuck it, I'm only sharing my GIF code from now on.
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Tags: