REXPaint > Everything REXPaint

Java/Scala based image export in *.xp format

(1/1)

cosplay:
Hi There,
I'm working on CosPlay Engine (https://cosplayengine.com) and I wrote a simple function that stores any image in *.xp format so that it could be further edited in REXPaint. I've followed the format details in the manual. In fact, I have two functions: one for reading *.xp files and one for write in *.xp format. Reading works fine.

However, when I am trying to open *.xp file produced by my function in REXPaint - it says in 'run.log' the following:
N=0000308 |   CPathButton::init() | Ignoring protected file: images/pong_logo.xp

(pong_logo.xp is the file I produced).

Here's direct source code for the *.xp image saver: https://github.com/nivanov/cosplay/blob/dc853a45e6b460dac4e1ca665041188eaac7c38a/modules/cosplay/src/main/scala/org/cosplay/CPImage.scala#L215

Any clues would be greatly appreciated - thanks!

Kyzrati:
Hey cosplay, the only way to get that message ("Ignoring protected file") should be if the layer count happens to be stored as a value >= 10000, so maybe something went wrong there? (I use that as a special way to identify .xp files for my own use with a different version of RP.)

It looks like you're indeed saving it as 1 by default there with "buf.putInt(1) // Only 1 layer", but I dunno, maybe the actual file output is not quite what you intended.

If you want you can attach your .xp file here and I can look at it, but that'd be what to check first.

cosplay:
Got it to work - it was a problem in my side. Works perfect right now. CosPlay now have bi-directional support for REXPaint *.xp format. Excellent!

Kyzrati:
Good to hear!

Navigation

[0] Message Index

Go to full version