steffest / DPaint-js

Webbased image editor, modeled after the legendary Deluxe Paint with a focus on retro Amiga file formats: read and write Amiga icon files and IFF ILBM images
https://www.stef.be/dpaint/
MIT License
486 stars 28 forks source link

IFF - Can't parse file #27

Open warpdesign opened 4 months ago

warpdesign commented 4 months ago

I found a sample iff file that from what I read can be opened with Photoshop, but DPaint-js produces random pixels instead.

I don't have PhotoShop so I could not see the expected output.

steffest commented 4 months ago
image

Deluxe Paint can't open that file as well. (I guess software from the early 90's also isn't supposed to open 3840x5760 24 bit images :-) ) PhotoShops IFF implementation is - I assume - mostly targeted towards Maya. it certainly is not compatible with anything Deluxe Paint related. (Photoshop can't read Deluxe Paint IFF files and vica versa)

I'll take a quick look what causing it, but as IFF is by design a container format where every program can define it own chunks, it's probably Photoshop specific, and probable a bit out of scope.

But still ... could be easy to implement.

warpdesign commented 4 months ago

Oh Interesting! I didn't know Maya supported IFF.

Btw I was unable to find grayscale IFF files (these don't have a CMAP chunk and are usually 8 bpp or less from what I could read). Any idea where I could find or how to generate one?

Couldn't Deluxe Paint V open IFF-24 pictures? I thought so. I'll dig up my original CD to find out.

steffest commented 4 months ago

Yes Deluxe Paint V can open IFF-24 bit pictures (and so can dpaint.js) But this is not a standard one.

image

Interestingly, some Amiga 24-bit image editors open it with the exact same garbled pixels as dpaint.js, so at least there's some consistency. :-)

image

And double interestingly: if the latest IFF datatypes are installed, multiview on Amiga CAN open it ... (and surprisingly fast) image

OK, I'm intrigued. Time is limited this week, but I'll figure it out next week.

warpdesign commented 4 months ago

Hmm.. that's interesting.

ffmpeg also outputs garbage. I wrote an ILBM decoder for SerenityOS: I'll see what happens there.

Nicolas RAMZ - http://www.warpdesign.fr/

AthenaJS - https://athenajs.github.io

On Mon, Jun 24, 2024 at 1:24 PM Steffest @.***> wrote:

Yes Deluxe Paint V can open IFF-24 bit pictures (and so can dpaint.js) But this is not a standard one.

image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/d60241d4-b98b-4c79-8673-7232e3cfba48

Interestingly, some Amiga 24-bit image editors open it with the exact same garbled pixels as dpaint.js, so at least there's some consistency. :-)

image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/f3039cab-6400-482e-a59a-57144074f494

And double interestingly: if the latest IFF datatypes are installed, multiview on Amiga CAN open it ... (and surprisingly fast) image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/3a705213-7771-4f82-aa61-3afd5af8c211

OK, I'm intrigued. Time is limited this week, but I'll figure it out next week.

— Reply to this email directly, view it on GitHub https://github.com/steffest/DPaint-js/issues/27#issuecomment-2186343519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQXYCA42OC77KGETJAZZ3ZI76XFAVCNFSM6AAAAABJYXQ7B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGM2DGNJRHE . You are receiving this because you authored the thread.Message ID: @.***>

warpdesign commented 4 months ago

That may be a hint: some 24bit ILBM files may be encoded using a different ordering:

R7 G7 B7 R6 G6 B6 R5 G5 B5 R4 G4 B4 R3 G3 B3 R2 G2 B2 R1 G1 B1 R0 G0 B0 instead of R0-R7,G0-B7,B0-B7

Nicolas RAMZ - http://www.warpdesign.fr/

AthenaJS - https://athenajs.github.io

On Mon, Jun 24, 2024 at 2:48 PM Nicolas Ramz @.***> wrote:

Hmm.. that's interesting.

ffmpeg also outputs garbage. I wrote an ILBM decoder for SerenityOS: I'll see what happens there.

Nicolas RAMZ - http://www.warpdesign.fr/

AthenaJS - https://athenajs.github.io

On Mon, Jun 24, 2024 at 1:24 PM Steffest @.***> wrote:

Yes Deluxe Paint V can open IFF-24 bit pictures (and so can dpaint.js) But this is not a standard one.

image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/d60241d4-b98b-4c79-8673-7232e3cfba48

Interestingly, some Amiga 24-bit image editors open it with the exact same garbled pixels as dpaint.js, so at least there's some consistency. :-)

image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/f3039cab-6400-482e-a59a-57144074f494

And double interestingly: if the latest IFF datatypes are installed, multiview on Amiga CAN open it ... (and surprisingly fast) image.png (view on web) https://github.com/steffest/DPaint-js/assets/763047/3a705213-7771-4f82-aa61-3afd5af8c211

OK, I'm intrigued. Time is limited this week, but I'll figure it out next week.

— Reply to this email directly, view it on GitHub https://github.com/steffest/DPaint-js/issues/27#issuecomment-2186343519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQXYCA42OC77KGETJAZZ3ZI76XFAVCNFSM6AAAAABJYXQ7B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGM2DGNJRHE . You are receiving this because you authored the thread.Message ID: @.***>