From png to txt and then to tmx

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
namespace
Posts: 2
Joined: 2019-01-13T06:53:40-07:00
Authentication code: 1152

From png to txt and then to tmx

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: From png to txt and then to tmx

Post by snibgo »

TMX is not a format listed in "magick -list format".
snibgo's IM pages: im.snibgo.com
namespace
Posts: 2
Joined: 2019-01-13T06:53:40-07:00
Authentication code: 1152

Re: From png to txt and then to tmx

Post by namespace »

So is it possible to do a conversion from png to txt separating the colored part from the alpha channel?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: From png to txt and then to tmx

Post 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:
snibgo's IM pages: im.snibgo.com
Post Reply