[Fixed] My PNG a splode (2.0.92)

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Fixed] My PNG a splode (2.0.92)

by randi » Mon Dec 06, 2004 5:31 pm

The best approach to take would probably be to use just a few horizontal bars (maybe around 8) and then draw that image several times to get the full image.

by Risen » Mon Dec 06, 2004 3:17 pm

Would it perform better if I broke it up? I didn't have any problems displaying a 320x200 version of this.

by randi » Mon Dec 06, 2004 2:52 pm

Note that this image is going to kill performance if you do display it, for the same reason it crashed before. If it was a series of vertical bars instead of horizontal bars, it will be faster.

by Risen » Mon Dec 06, 2004 1:38 pm

randy wrote:Fixed. The problem isn't that this is a PNG at all but that it has so many transparent regions per column. A standard Doom image would have crashed the same way, because it exceeds assumptions I made about the number of transparent areas that would need to be handled per column.
Interesting. I thought my earlier crashes were due to a bad import since XWE wasn't displaying them. I may have been running into this instead.

by randi » Mon Dec 06, 2004 12:37 pm

wildweasel wrote:And doesn't it have a size difference as well?
Yes, interlaced PNGs are almost always larger.

by Csonicgo » Sat Dec 04, 2004 6:06 pm

yes. thank you ww, that's my problem.

by wildweasel » Fri Dec 03, 2004 11:22 pm

Some graphics programs don't offer the user a choice when saving PNG files (ie. Pixia, Photoshop 6 i think) and might be saving them as interlaced. And doesn't it have a size difference as well?

by randi » Fri Dec 03, 2004 10:45 pm

Fixed. The problem isn't that this is a PNG at all but that it has so many transparent regions per column. A standard Doom image would have crashed the same way, because it exceeds assumptions I made about the number of transparent areas that would need to be handled per column.
Csonicgo wrote:that would rock, please do.
Can I ask why? The only thing an interlaced PNG offers over a non-interlaced one is that it has better behavior when progressively displaying it in a web browser.

by Csonicgo » Thu Dec 02, 2004 12:58 am

randy wrote:Can I assume from the file name that this is an interlaced PNG? I don't have support for that right now. Should I add it? :-)
that would rock, please do.

by Risen » Wed Dec 01, 2004 9:40 pm

It's a series of black and transparent lines, intended to create an interlacing effect. I didn't interlace the graphic. (Though it's possible it got saved that way...)

by randi » Wed Dec 01, 2004 9:29 pm

Can I assume from the file name that this is an interlaced PNG? I don't have support for that right now. Should I add it? :-)

by Risen » Wed Dec 01, 2004 8:59 pm

Sorry for the delay on this, I was working on other parts and just recently got back to it. I don't have the previous image anymore, but here's one I do have. Also, here's a crash log for it from .94

Code: Select all

Code: ACCESS_VIOLATION
Tried to read address 00000100
Flags: 00000000
Address: 00000100

Windows NT 5.1 Build 2600 Service Pack 2

GS=0000  FS=003b  ES=0023  DS=0023
EAX=00000000  EBX=00000000  ECX=00000000  EDX=00000000
ESI=00000004  EDI=00000002
EBP=00000000  EIP=00000100  ESP=0012fb44  CS=001b  SS=0023
EFlags=00290246
 CF- PF+ AF- ZF+ SF- TF- IF+ DF- OF- NT- RF+ VM- AC- VI+ VP-

FPU State:
 ControlWord=027f StatusWord=0020 TagWord=ffff
 ErrorOffset=100126f4
 ErrorSelector=0158001b
 DataOffset=10047a04
 DataSelector=ffff0023
 Cr0NpxState=00000000

MM0=9fa6e90000000000
MM1=d79c218fe43e2800
MM2=924bc25bdf800000
MM3=8000000000000000
MM4=0000000000000000
MM5=0000000400000002
MM6=0000000000000000
MM7=000000230012fb44

Running threads:
00000560 at 00000100*
00000ab8
000008e8
000008b4
00000914
00000c94
000009cc
00000b90
000000a0

Loaded modules:
00400000 - 00678fff  zdoom.exe
7c900000 - 7c9affff  ntdll.dll
7c800000 - 7c8f3fff  kernel32.dll
773d0000 - 774d1fff  COMCTL32.dll
77c10000 - 77c67fff  msvcrt.dll
77dd0000 - 77e6afff  ADVAPI32.dll
77e70000 - 77f00fff  RPCRT4.dll
77f10000 - 77f55fff  GDI32.dll
77d40000 - 77dcffff  USER32.dll
77f60000 - 77fd5fff  SHLWAPI.dll
71ad0000 - 71ad8fff  WSOCK32.dll
71ab0000 - 71ac6fff  WS2_32.dll
71aa0000 - 71aa7fff  WS2HELP.dll
76b40000 - 76b6cfff  WINMM.dll
10000000 - 10095fff  fmod.dll
77be0000 - 77bf4fff  MSACM32.dll
774e0000 - 7761bfff  ole32.dll
763b0000 - 763f8fff  comdlg32.dll
7c9c0000 - 7d1d3fff  SHELL32.dll
76f50000 - 76f57fff  wtsapi32.dll
76360000 - 7636ffff  WINSTA.dll
5b860000 - 5b8b3fff  NETAPI32.dll
77fe0000 - 77ff0fff  Secur32.dll
73f10000 - 73f6bfff  dsound.dll
77c00000 - 77c07fff  VERSION.dll
76c30000 - 76c5dfff  WINTRUST.dll
77a80000 - 77b13fff  CRYPT32.dll
77b20000 - 77b31fff  MSASN1.dll
76c90000 - 76cb7fff  IMAGEHLP.dll
72d20000 - 72d28fff  wdmaud.drv
72d10000 - 72d17fff  msacm32.drv
77bd0000 - 77bd6fff  midimap.dll
73ee0000 - 73ee3fff  KsUser.dll
76fd0000 - 7704efff  CLBCATQ.DLL
77120000 - 771abfff  OLEAUT32.dll
77050000 - 77114fff  COMRes.dll
6ce10000 - 6ce47fff  dinput8.dll
688f0000 - 688f8fff  HID.DLL
77920000 - 77a12fff  SETUPAPI.DLL
73760000 - 737a8fff  ddraw.dll
73bc0000 - 73bc5fff  DCIMAN32.dll

Bytes near EIP:
000000f0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00000100: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00000110: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

ZDoom version 2.0.94

Command line:
 D:\zdoom\zdoom.exe -iwad C:\old_D\Doom\doom2.wad -file D:\project\ze1\resource.wad D:\zdoom\tempmap.wad -map MAP11 -skill 3
IWAD: doom2.wad

Current map: MAP11

viewx = 273997226
viewy = 272
viewz = 274
viewangle = 3834226545

Possible call trace:
 00000100  BOOM
 004f0198  call [00645ddc]
 004873c2  call 004effd0
 0048b2f8  call 00486a00
 004b0146  call 0048b100
 004b0091  call [edx+0x18]
 004b3119  call 004afe60
 00416d6c  call 004b3080
 00417c9f  call 00416b00
 0042d278  call 00409ac0
 0040b0b3  call 0040b000
 0040b0b3  call 0040b000
 004a2841  call 0040b0a0
 004a2943  call 0051265e
 0049f9e3  call 00417cd0
 0049fcf5  call 0049f630
 00515b0a  call 0049fc80
 0051599e  call 00513400
 00515986

Stack Contents:
0012fb44: 004f0198 00000000 00c0c050 00040000  ··O·····P·······
0012fb54: 00010000 0012fb7c 00000000 00000000  ····|···········
0012fb64: 004873c2 00000001 00000000 00c22fb1  ·sH··········/··
0012fb74: 000001e1 0a4bfe19 0a70156c 02800000  ······K·l·p·····
0012fb84: 00010000 00000000 00000280 0012fb7c  ············|···
0012fb94: ffffffff 000001e0 00000000 00000280  ················
0012fba4: 00000000 00000280 00000002 00c5a008  ················
0012fbb4: 00000000 00000000 000001e0 00010000  ················
0012fbc4: ffffffff 0048b2f8 00c0cfb0 00000280  ······H·········
0012fbd4: 00000000 00000000 8000138d 00000000  ················
0012fbe4: 00000002 0012fc28 00000000 000001e0  ····(···········
0012fbf4: 00000000 0a4eb008 00000000 0000000a  ······N·········
0012fc04: 00000000 00000280 00000000 004b0146  ············F·K·
0012fc14: 00c0cfb0 0000000b 00000000 00000000  ················
0012fc24: 00c22fb0 80001396 00000280 80001397  ·/··············
0012fc34: 000001e0 00000000 004b0091 00000000  ··········K·····
0012fc44: 00000000 00000000 00000000 000001e0  ················
0012fc54: 000001e0 0a44bfa0 0012fcdc 00394650  ······D·····PF9·
0012fc64: 00000000 00000001 00000000 fffffffe  ················
0012fc74: 00000000 00000000 00befa98 004b3119  ·············1K·
0012fc84: 000001e0 0000026e 00000000 00000001  ····n···········
0012fc94: 00416d6c 00000001 00000001 0039a4a0  lmA···········9·
0012fca4: 00000000 42b40000 05b40686 ffffe994  ·······B········
0012fcb4: 00417c9f 0000026e 0039a4a0 00000001  ·|A·n·····9·····
0012fcc4: 0042d278 00000000 0012fcb8 0012fe04  x·B·············
0012fcd4: 00523e35 00000000 00000004 000000f8  5>R·············
0012fce4: 0012fe6c 0000017e cc458c60 00bf16b8  l···~···`·E·····
0012fcf4: 3d44dc3b 8db85bb3 6d6f6f44 7475412e  ;·D=·[··Doom.Aut
0012fd04: 616f6c6f d4000064 db58380b 208081eb  oload····8X···· 
0012fd14: 3e3b4017 62e20320 744f32d7 5061ae49  ·@;> ··b·2OtI·aP
0012fd24: efb9466a 47cbfbb1 f370db77 b31894ba  jF·····Gw·p·····
0012fd34: 8dbbf9bb b6941e60 775286c7 77605998  ····`·····Rw·Y`w
0012fd44: 00000002 00000001 00000002 68db70d3  ·············p·h
0012fd54: 0040b0b3 0012fd64 00000002 68db70d3  ··@·d········p·h
0012fd64: 0040b0b3 0012fd74 004a2841 005534f0  ··@·t···A(J··4U·
0012fd74: 004a2943 00000094 00000005 00000001  C)J·············
0012fd84: 00000a28 00000002 76726553 20656369  (·······Service 
0012fd94: 6b636150 77003220 775289af 001597a8  Pack 2·w··Rw····
0012fda4: 8007000e 776059bc 774e4314 00000000  ·····Y`w·CNw····
0012fdb4: 0012fdd8 77551c27 001597a8 7c80977b  ····'·Uw····{··|
0012fdc4: 0012fe00 00000000 77605914 0012fdf8  ·········Y`w····
0012fdd4: 774f43e3 00000001 00000000 00000002  ·COw············
0012fde4: 00000000 00000000 0000026e 0000017e  ········n···~···
0012fdf4: 00000002 0012fe08 00db70d3 68db70d3  ·········p···p·h
0012fe04: 0012fe60 00523e58 ffffffff 0049f9e3  `···X>R·······I·
0012fe14: ffffffff 7c80e00d 7ffd5000 00000000  ·······|·P·····
0012fe24: 00000000 0000026e 0000017e 00000001  ····n···~·······
0012fe34: 000f4240 0012fe2c 00000020 00000276  @B··,··· ···v···
0012fe44: 00000000 00400000 00400240 00400218  ······@·@·@···@·
0012fe54: 7c800000 00400000 0012fe14 0012fe88  ···|··@·········
0012fe64: 005253b0 00000000 0012fe98 0049fcf5  ·SR···········I·
0012fe74: 7c80b529 00000000 7ffd5000 0012fe74  )··|·····P·t···
0012fe84: 0012f768 0012ffb0 00515748 00552b90  h·······HWQ··+U·
0012fe94: 00000000 0012ffc0 00515b0a 00400000  ·········[Q···@·
0012fea4: 00000000 00152325 00000005 00000094  ····%#··········
0012feb4: 00000005 00000001 00000a28 00000002  ········(·······
0012fec4: 76726553 20656369 6b636150 00003220  Service Pack 2··
0012fed4: e308c000 e308d000 e308e000 e308f000  ················
0012fee4: e3090000 e3091000 e3092000 e3093000  ········· ···0··
0012fef4: e3094000 e3095000 e3096000 e3097000  ·@···P···`···p··
0012ff04: e3098000 ffffffff f8281c08 81a38da8  ··········(·····
0012ff14: 00000300 00018948 00000001 0000000d  ····H···········
0012ff24: 00000000 0000000d 0000208c 8055ef80  ········· ····U·
0012ff34: f8281c48 80549631 823f6000 0051599e  H·(·1·T··`?··YQ·
0012ff44: 0012d2f4 00000018 7ffd5000 00000044  ·········P·D···
0012ff54: 001535d8 00153588 00153638 00000000  ·5···5··86······
0012ff64: 00000000 00000000 00000000 00000000  ················
0012ff74: 00000000 00000000 00000001 00000005  ················
0012ff84: 00000000 ffffffff ffffffff ffffffff  ················
0012ff94: 00000408 00000000 00000001 00152325  ············%#··
0012ffa4: 00000000 0012feb0 8058a6b8 0012ffe0  ··········X·····
0012ffb4: 00515748 0059aa90 00000000 0012fff0  HWQ···Y·········
0012ffc4: 7c816d4f 0012d2f4 00000018 7ffd5000  Om·|·········P·
0012ffd4: 8054b038 0012ffc8 81a38da8 ffffffff  8·T·············
0012ffe4: 7c8399f3 7c816d58 00000000 00000000  ···|Xm·|········
0012fff4: 00000000 00515986 00000000           ·····YQ·····

by Graf Zahl » Thu Nov 04, 2004 4:48 pm

Well, apparently you don't much about PNG's.

1. They use ZLIB for compression and that is the same algorithm that's used in ZIP files.
2. I have worked enough with this stuff and can tell you that in many cases an 8-bit PNG compresses better. For the simple reason that if you combine more than one pixel into one byte it will become much harder to detect redundant patterns of pixels. If they are shifted by one pixel from one line to the next with 8-bit format they will be recognized ans reduced to almost nothing. With a 2- or 4- bit format you will get completely different data that can't be packed further. And the less bits there are per pixel the more likely is it that patterns can't be detected.
And let's not forget that one compression stage in PNG is a Huffman packer which reduces the amount of bits needed for each byte in the source data. If you only have 2 different colors they will make up the majority of the source data and reduced to almost the same amount as in a 2-bit format (but much better compressed in the first stage) I can tell you for certain that compressing 17-color pictures always gives better results than using 16-color pictures. I have done that often enough to squeeze some space out of the cell-phone games I am developing.

by GeeDougg » Thu Nov 04, 2004 4:32 pm

Redundancies are "reduced", not removed. The data will still need to be there for when it's decompressed, (I.E., a shadow of the 256-colour map will still be there, and even if the compressio excludes that, it will still need to remember that the file was 256-colour, as opposed to, say, 4 colour.... And last time I checked, 256 is a bigger number than 4 (and has more characters). :wink: Also, AFAIK PNG files don't have zip-based compression.... :?

by Graf Zahl » Thu Nov 04, 2004 4:10 pm

But it still compresses better because a ZIP based compressor can detect redundancies much better if each pixel is its separate byte.

Top