Page 1 of 1

From png to txt and then to tmx

Posted: 2019-01-14T08:39:45-07:00
by namespace
Hi, I wanted to know if it's possible to go from png to txt and then to tmx. I want to convert a png image to a tilemap.
In my case I want to store on the txt file only the data of the rgb part of the png ignoring the alpha/transparent part.
Do you think it's possible?
Or is it possible to go directly from png to tmx?

Re: From png to txt and then to tmx

Posted: 2019-01-14T08:46:57-07:00
by snibgo
TMX is not a format listed in "magick -list format".

Re: From png to txt and then to tmx

Posted: 2019-01-14T09:59:06-07:00
by namespace
So is it possible to do a conversion from png to txt separating the colored part from the alpha channel?

Re: From png to txt and then to tmx

Posted: 2019-01-14T10:49:27-07:00
by snibgo
The colour RGB channels with no alpha:

Code: Select all

magick toes_holed.png -alpha off txt:
Just the alpha:

Code: Select all

magick toes_holed.png -alpha extract txt: