Talk:Flipnote Files/PPM

From DSiBrew
Revision as of 15:19, 10 February 2010 by Pbsds (talk | contribs)
Jump to navigation Jump to search

Could you guys post a example for decoding the preview image? i cant figure out the 8x8 tile thing. i will give credit to you:).Preview of what i have: FlipnoteImageDecodedByPBSDS.png--pbsds 09:29, 24 December 2009 (UTC)

See User:Remark/Icon2ppm.c. -- Remark 09:45, 24 December 2009 (UTC)

Thanks:)--pbsds 09:55, 24 December 2009 (UTC)

It doesn't work! Here is the code im using(i had to transelate it):

Dim $ImageOutput[4072]
for $x=0 to 46 step 1
	for $y=0 to 7 step 1
		for $z=0 To 7 Step 1
			ImageOutput[($x*64)+(16*$y)+(4*$z)]   = RawImage[($x*64)+(32*$z)+(4*$y)]
			ImageOutput[($x*64)+(16*$y)+(4*$z)+1] = RawImage[($x*64)+(32*$z)+(4*$y)+1]
			ImageOutput[($x*64)+(16*$y)+(4*$z)+2] = RawImage[($x*64)+(32*$z)+(4*$y)+2]
			ImageOutput[($x*64)+(16*$y)+(4*$z)+3] = RawImage[($x*64)+(32*$z)+(4*$y)+3]
		Next
	Next
Next

Output: Test2.png



You made a typo here:

for x=0 to 46 step 

-Remark 18:42, 24 December 2009 (UTC)

Made no difference...--pbsds 21:08, 24 December 2009 (UTC)


If you would've used a sane language, you would've gotten a segfault. :-)

Please do some research on the tiling, my code is written for the 32x32 icons you see in the DSiMenu.

- Remark 21:52, 24 December 2009 (UTC)


I had to set the RawImage and the ImageOutput arrays to 1000 more pixels than needed to avoid the segfault.

I think i'll try again tomorrow. but now im off to bed:)--pbsds 00:39, 25 December 2009 (UTC)


WooHoo! im really close now!: Test3.png--pbsds 14:43, 25 December 2009 (UTC)


Finaly got it!: Test4.png--pbsds 21:26, 27 December 2009 (UTC)

Pallete

i don't think my RGB pallete is perfect... Could someone post a RGB version of the pallete? My pallete have too sharp colors :( --pbsds 01:03, 4 January 2010 (UTC)

Maybe i should post my pallete so you guys can check if its wrong:

0 = FFFFFF

1 = 525252

2 = FFFFFF

3 = A4A4A4

4 = FF0000

5 = 7B0000

6 = FF7B7B

7 = 00FF00

8 = 0000FF

9 = 00007B

A = 7B7BFF

B = 00FF00

C = FF00FF

D = 00FF00

E = 00FF00

F = 00FF00

--pbsds 10:52, 4 January 2010 (UTC)

Use the following formula: (x / 32) * 256 To convert between the scales 0-31 and 0-255.

Thanks!--pbsds 15:15, 5 January 2010 (UTC)

Modifying the file?

Has anyone managed to get a modified PPM file running on the DSi? If so, can you update the wiki with your findings. Chronic667 20:40, 13 January 2010 (UTC) I don't know much about that but i think there is a hash in there.--pbsds 14:19, 10 February 2010 (UTC)