3 deleted 8 characters in body
source | link

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There are several lines of horizontal horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There are several lines of horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There are several horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

2 added 4 characters in body
source | link

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There are several lines of horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There several lines of horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There are several lines of horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image

1
source | link

You asked this a couple of months ago, but I'm going to answer anyway.

First, I fear that your decompression code is buggy. There several lines of horizontal lines of noise, and I'm pretty sure they're not supposed to be there.

Your A+B=C guess was correct. A tell-tale sign are the visible horizontal edges but hidden vertical edges. I think your mistake was simply to do the addition with the wrong endianness.

I wrote a little Python script:

from PIL import Image
im = Image.open('orig.png')
w, h = im.size
pix = im.load()
def add(p, q):
    # Convert (R,G,B) tuples to RGB integers, add them, and convert back
    pp = (p[0] << 16) + (p[1] << 8) + p[2]
    qq = (q[0] << 16) + (q[1] << 8) + q[2]
    r = pp + qq
    return ((r >> 16) & 0xFF, (r >> 8) & 0xFF, r & 0xFF)
for y in range(1, h):
    for x in range(w):
        pix[x,y] = add(pix[x, y], pix[x, y-1])
im.save('out.png')

The result is this image. You can see that the top third matches the PSP image, but starting from the line of noise in the source image, the picture becomes distorted. Fix your decompression code and the picture will come out right :)

processed image