![]() |
if ya have jsd, that big area with color blocks is the 256 pallete which is used by jj2, or atleast that's what i think.
|
Quote:
EDIT: Wait, there are more colors ;( (in one color, they've got noise) |
There's a .pal file included in the pyJ2A.zip that you downloaded. Use that.
|
Quote:
|
Same error.
|
Quote:
Also, the python files worked like a charm for me, but after importing a png file, the colors got messed up. I have no idea why, because I have loaded the included palette in Paint Shop Pro. Any help would be appreciated. |
Without seeing some combination of the png, the .j2a, or the code, it's difficult for me to say anything.
|
Sorry, I was browsing from my phone when I wrote that reply. Anyway, here's the image.
[IMG]http://i.imgur.com/FFXbC0D.png[/IMG] You can see the original sprite on the left and the one that shows up in JazzSD on the right. EDIT: Also, here's some additional information. After re-opening the image in Paint Shop Pro, it has the following palette. [IMG]http://i.imgur.com/ff9jxK6.png[/IMG] |
Well that palette clearly isn't the JJ2 palette so the answer is fairly simple. You do need to retain correct palette indices.
|
I can't do that. It keeps sorting out colors that aren't used.
|
Well, graphicsgale doesn't do that unless you tell it to remove unused colours. The free version will do fine.
I'm guessing you can stop PSP from removing unused colours, but I don't use that program so I'm useless on that. |
In the Save dialog, click "Options" and then uncheck "Optimized palette." The flow/wording may be a bit different depending on your PSP version but it's probably similar.
|
Thanks! I will check it out.
|
What am I doing wrong when I get this error from JSD: "Run-time error '11': Division by zero"?
My animation contains only one frame which is 128x16 pixels large, has the palette loaded and an fps.10 file next to it and it is named 0,-125,-8,0,0,0,0.png. I hope to have included enough info. |
JSD is not a reliable measure of whether your file was saved correctly. Only JJ2 can tell you that.
|
"Tried to load an invalid animation..."
That's the error I get. |
szmol96's picture triggered the following Python error, resulting in producing an invalid j2a file:
Code:
Traceback (most recent call last):The error can be walked around by appending columns of index 0 pixels on each side of the picture (presumably one side would suffice but I didn't want to check which one it has to be). |
Quote:
|
Does this work? I haven't touched this stuff in a while.
|
Quote:
|
I'm getting this error.
Code:
$ python j2a-extract.py |
I don't know Python, but as far as I can tell, the meaning of that line is implementation-defined, dependent on type size. It should work in almost all popular data models with the main exception of LP64. Are you on 64-bit Linux? Anyway, try modifying line 54 of j2a.py by changing "L" to "I".
|
Yeah, I'm on 64-bit Linux. Changing "L" to "l" just switched it from unsigned to signed long, so that didn't work. But you were right about what was going wrong. My solution was to change it to "<L" which locks it to 4-bytes little endian.
|
I said "I" as in capital "i", standing for "int", which is 4 bytes in LP64, not "l" as in lowercase "L", but glad you solved it.
|
Oh. l hate sans serif fonts sometimes.
|
I have a problem while trying to draw a sprite from a custom j2a file, a 800x600 png image. I am converting the image from a different palette to the JJ2's Palette. After I convert it and I save it in the specified format (0,-1,-1,0,0,0,0.png), j2a-import.py manages to import it in a .j2a file, but when I try to load from it, it gives me an Access Violation saying that the j2a is corrupt. The error is probably from how it is converted to the jj2 palette. I used GIMP to convert it to the jj2 palette.
|
I think the .py would have complained if the image weren't properly paletted. It may be an obscure issue with the image size... could you PM the image to me, maybe?
|
Quote:
|
Code:
void onLevelLoad() { |
I am using Linux btw, could that be the problem? I used Python 2.7. Does the python script use a Windows-based function?
Edit: It doesn't look that there's any file path problem. |
There's a windows-vs.-linux discussion a bit farther up this page... that was about the extract script, not the import, but you might have similar success looking for instances of
struct.pack in the script and trying to force the size/endianness/whatever to work on your system. |
That didn't help. It might have helped, now I don't get crashed. But the image doesn't show now. I think I have to change to I some specific struct.pack s How am I suppose to find out which of them to change? Nvm... I figured it out! |
Could you try using py2exe so one won't have to have Python to use the tool (py2exe AFAIK embeds Python interpreter and all used libraries in the exe)? Because Python changes much even in the minor versions or it can simply not work on someone's system, as it's case with me. I mean, the interpreter and IDLE runs for me, it's just that it's unable to find even the basic libs. And yes, I have my %PATH% set correctly. I guess Python's compatibility with Win8, at least for the 2.x branch is pretty dodgy.
Never had any issues with scripts that were ran through py2exe so if you'd do that, it should work. |
I just spent an hour or so fiddling with py2exe and cxfreeze, and neither of them produced working executables, and so I've lost interest.
|
Darn. Feels bad. Maybe someone else will have more luck?
|
| All times are GMT -8. The time now is 02:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online