counting_pine and I are working for another verison
Its not up yet, however,
So far I have added a Get_Error function to counting_pine's newest version, which returns the error of the last run
I am currently working on a system to extensively batch test each new version from now on, so dont worry counting_pine, Im on it ;-)
Anyways, thats all for now, just an update,
Thrawn
Pload()
Not bad...you seem to have broken 2 Bps, it didnt fail, just rendered wrongNonInterlaced Types:
Passed - 1 Bps Color 0 [Grayscale]
Kindov - 2 Bps Color 0 [Grayscale]
Passed - 4 Bps Color 0 [Grayscale]
Passed - 8 Bps Color 0 [Grayscale]
Passed - 16Bps Color 0 [Grayscale]
Passed - 8 Bps Color 2 [RGB]
Passed - 16Bps Color 2 [RGB]
Passed - 1 Bps Color 3 [Paletted]
Kindov - 2 Bps Color 3 [Paletted]
Passed - 4 Bps Color 3 [Paletted]
Passed - 8 Bps Color 3 [Paletted]
Passed - 8 Bps Color 4 [Grayscale Alpha]
Passed - 16Bps Color 4 [Grayscale Alpha]
Passed - 8 Bps Color 6 [RGBA]
Passed - 16Bps Color 6 [RGBA]
Interlaced Types:
Passed - 1 Bps Color 0 [Grayscale]
Kindov - 2 Bps Color 0 [Grayscale]
Passed - 4 Bps Color 0 [Grayscale]
Passed - 8 Bps Color 0 [Grayscale]
Passed - 16Bps Color 0 [Grayscale]
Passed - 8 Bps Color 2 [RGB]
Passed - 16Bps Color 2 [RGB]
Passed - 1 Bps Color 3 [Paletted]
Kindov - 2 Bps Color 3 [Paletted]
Passed - 4 Bps Color 3 [Paletted]
Passed - 8 Bps Color 3 [Paletted]
Passed - 8 Bps Color 4 [Grayscale Alpha]
Passed - 16Bps Color 4 [Grayscale Alpha]
Passed - 8 Bps Color 6 [RGBA]
Passed - 16Bps Color 6 [RGBA]
Filter Test [All NonInterlaced]:
Passed - 8 Bps Color 0 [Grayscale] Filter 0
Passed - 8 Bps Color 2 [RGB] Filter 0
Passed - 8 Bps Color 0 [Grayscale] Filter 1
Passed - 8 Bps Color 2 [RGB] Filter 1
Passed - 8 Bps Color 0 [Grayscale] Filter 2
Passed - 8 Bps Color 2 [RGB] Filter 2
Passed - 8 Bps Color 0 [Grayscale] Filter 3
Passed - 8 Bps Color 2 [RGB] Filter 3
Passed - 8 Bps Color 0 [Grayscale] Filter 4
Passed - 8 Bps Color 2 [RGB] Filter 4
Wierd Sizes Test [All Color 3 PLTEd]:
Failed - 1 Bps 1x1 Interlaced
Failed - 1 Bps 1x1 NonInterlaced
Failed - 1 Bps 2x2 Interlaced
Failed - 1 Bps 2x2 Non Interlaced
Failed - 1 Bps 3x3 Interlaced
Failed - 1 Bps 3x3 Non Interlaced
Failed - 1 Bps 4x4 Interlaced
Failed - 1 Bps 4x4 Non Interlaced
Failed - 2 Bps 5x5 Interlaced
Failed - 2 Bps 5x5 Non Interlaced
Failed - 2 Bps 6x6 Interlaced
Failed - 2 Bps 6x6 Non Interlaced
Failed - 2 Bps 7x7 Interlaced
Failed - 2 Bps 7x7 Non Interlaced
Passed - 2 Bps 8x8 Interlaced
Passed - 2 Bps 8x8 Non Interlaced
Failed - 2 Bps 9x9 Interlaced
Failed - 2 Bps 9x9 Non Interlaced
Passed - 4 Bps 32x32 Interlaced
Passed - 4 Bps 32x32 Non Interlaced
Failed - 4 Bps 33x33 Interlaced
Failed - 4 Bps 33x33 Non Interlaced
Passed - 4 Bps 34x34 Interlaced
Passed - 4 Bps 34x34 Non Interlaced
Failed - 4 Bps 35x35 Interlaced
Failed - 4 Bps 35x35 Non Interlaced
Passed - 4 Bps 36x36 Interlaced
Passed - 4 Bps 36x36 Non Interlaced
Failed - 4 Bps 37x37 Interlaced
Failed - 4 Bps 37x37 Non Interlaced
Passed - 4 Bps 38x38 Interlaced
Passed - 4 Bps 38x38 Non Interlaced
Failed - 4 Bps 39x39 Interlaced
Failed - 4 Bps 39x39 Non Interlaced
Passed - 4 Bps 40x40 Interlaced
Passed - 4 Bps 40x40 Non Interlaced
Apparenly it choked on the odd sizes....seems to only like evens and powers of 2, 8 and above [Aborted with Array out of Bounds at like 576 and that area]
I got that batch thing working, so if you want to play with it...
Thrawn
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
OK, here's a (simplified) extract from UncompressIDAT, for handling 1bpp images:
It treats each byte as a set of 8 pixels, but if the width is not a multiple of 8, the last byte in the row won't have that many. But the routine will write 8, and consequently run over into the next row. Each row will be progressively more pixels out, and the routine will reach the end of the array too early.
So I think the best thing to do is to take i from 0 to Header.IWidth - 1, and have one or two separate counters to keep track of the position and bit offset in the IDAT.
Code: Select all
For i = 1 To BytesPerScanLine
ByteToRead = Offset + i
RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 7): RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 6) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 5) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 4) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 3) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 2) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = (ScanLine(ByteToRead) Shr 1) And &h1: RawScanLineIndex += 1
RawScanLine(RawScanLineIndex) = ScanLine(ByteToRead) And &h1
Next i
So I think the best thing to do is to take i from 0 to Header.IWidth - 1, and have one or two separate counters to keep track of the position and bit offset in the IDAT.
Hmmm...well, if you put a bunch of ifs there to only unpack the bits you need for Images less than 8 that should work...
Im gonna play around with that...I'll let you know
Yeah if its an odd number I see your point, the last loop through each row it will add an unneeded bit or two, resulting in a crash because our [correct] predetermined algo for determining the size of RawScanLine() array is smaller than what you're trying to put in it...we'll see *goes off coding*
EDIT:
Accually if you have a routine that determines how many pixels are per line that would be a great help
EDIT2:
Well that was an easy fix, even though I added about 8 Ifs per loop XD for the 1BPSs...I didnt see any other way though...gonna put it through another batch test, will post results...still need that pixels per scanline...
Thrawn
Im gonna play around with that...I'll let you know
Yeah if its an odd number I see your point, the last loop through each row it will add an unneeded bit or two, resulting in a crash because our [correct] predetermined algo for determining the size of RawScanLine() array is smaller than what you're trying to put in it...we'll see *goes off coding*
EDIT:
Accually if you have a routine that determines how many pixels are per line that would be a great help
EDIT2:
Well that was an easy fix, even though I added about 8 Ifs per loop XD for the 1BPSs...I didnt see any other way though...gonna put it through another batch test, will post results...still need that pixels per scanline...
Thrawn
Hmm...its getting better, the wierd sizes failed when you had a byte at the end of each scanline that has some unneeded bits in there, if I had that pixel per scanline algo, I could fix that no problem with a counter...umm...I seem to remember you haveing one in there on a previous version, Im gonna search this to see if its in thereNonInterlaced Types:
Passed - 1 Bps Color 0 [Grayscale]
Passed - 2 Bps Color 0 [Grayscale]
Passed - 4 Bps Color 0 [Grayscale]
Passed - 8 Bps Color 0 [Grayscale]
Passed - 16Bps Color 0 [Grayscale]
Passed - 8 Bps Color 2 [RGB]
Passed - 16Bps Color 2 [RGB]
Passed - 1 Bps Color 3 [Paletted]
Passed - 2 Bps Color 3 [Paletted]
Passed - 4 Bps Color 3 [Paletted]
Passed - 8 Bps Color 3 [Paletted]
Passed - 8 Bps Color 4 [Grayscale Alpha]
Passed - 16Bps Color 4 [Grayscale Alpha]
Passed - 8 Bps Color 6 [RGBA]
Passed - 16Bps Color 6 [RGBA]
Interlaced Types:
Passed - 1 Bps Color 0 [Grayscale]
Passed - 2 Bps Color 0 [Grayscale]
Passed - 4 Bps Color 0 [Grayscale]
Passed - 8 Bps Color 0 [Grayscale]
Passed - 16Bps Color 0 [Grayscale]
Passed - 8 Bps Color 2 [RGB]
Passed - 16Bps Color 2 [RGB]
Passed - 1 Bps Color 3 [Paletted]
Passed - 2 Bps Color 3 [Paletted]
Passed - 4 Bps Color 3 [Paletted]
Passed - 8 Bps Color 3 [Paletted]
Passed - 8 Bps Color 4 [Grayscale Alpha]
Passed - 16Bps Color 4 [Grayscale Alpha]
Passed - 8 Bps Color 6 [RGBA]
Passed - 16Bps Color 6 [RGBA]
Filter Test [All NonInterlaced]:
Passed - 8 Bps Color 0 [Grayscale] Filter 0
Passed - 8 Bps Color 2 [RGB] Filter 0
Passed - 8 Bps Color 0 [Grayscale] Filter 1
Passed - 8 Bps Color 2 [RGB] Filter 1
Passed - 8 Bps Color 0 [Grayscale] Filter 2
Passed - 8 Bps Color 2 [RGB] Filter 2
Passed - 8 Bps Color 0 [Grayscale] Filter 3
Passed - 8 Bps Color 2 [RGB] Filter 3
Passed - 8 Bps Color 0 [Grayscale] Filter 4
Passed - 8 Bps Color 2 [RGB] Filter 4
Wierd Sizes Test [All Color 3 PLTEd]:
Passed - 1 Bps 1x1 Interlaced
Passed - 1 Bps 1x1 NonInterlaced
Passed - 1 Bps 2x2 Interlaced
Passed - 1 Bps 2x2 Non Interlaced
Passed - 1 Bps 3x3 Interlaced
Passed - 1 Bps 3x3 Non Interlaced
Passed - 1 Bps 4x4 Interlaced
Passed - 1 Bps 4x4 Non Interlaced
Failed - 2 Bps 5x5 Interlaced
Failed - 2 Bps 5x5 Non Interlaced
Failed - 2 Bps 6x6 Interlaced
Failed - 2 Bps 6x6 Non Interlaced
Failed - 2 Bps 7x7 Interlaced
Failed - 2 Bps 7x7 Non Interlaced
Passed - 2 Bps 8x8 Interlaced
Passed - 2 Bps 8x8 Non Interlaced
Failed - 2 Bps 9x9 Interlaced
Failed - 2 Bps 9x9 Non Interlaced
Passed - 4 Bps 32x32 Interlaced
Passed - 4 Bps 32x32 Non Interlaced
Failed - 4 Bps 33x33 Interlaced
Failed - 4 Bps 33x33 Non Interlaced
Passed - 4 Bps 34x34 Interlaced
Passed - 4 Bps 34x34 Non Interlaced
Failed - 4 Bps 35x35 Interlaced
Failed - 4 Bps 35x35 Non Interlaced
Passed - 4 Bps 36x36 Interlaced
Passed - 4 Bps 36x36 Non Interlaced
Failed - 4 Bps 37x37 Interlaced
Failed - 4 Bps 37x37 Non Interlaced
Passed - 4 Bps 38x38 Interlaced
Passed - 4 Bps 38x38 Non Interlaced
Failed - 4 Bps 39x39 Interlaced
Failed - 4 Bps 39x39 Non Interlaced
Passed - 4 Bps 40x40 Interlaced
Passed - 4 Bps 40x40 Non Interlaced
EDIT: I am an bright, the number of pixels per scanline is the IWIDTH XD
Thrawn
SUCCESS! Source is being emailed to you
Im not going to post the test results again in consideration of the space this thread is taking on the forum, but they all passed that test :-)
You should look at it however and mabey make the algo more efficent...adding a if to every pixel if the bitdepth is less than 8 might get a little inefficent
Anyways, Im gonna start adding in some of the other acillery chunks, while you're doing that
Thrawn
Im not going to post the test results again in consideration of the space this thread is taking on the forum, but they all passed that test :-)
You should look at it however and mabey make the algo more efficent...adding a if to every pixel if the bitdepth is less than 8 might get a little inefficent
Anyways, Im gonna start adding in some of the other acillery chunks, while you're doing that
Thrawn