Convert texture .atlas file to .json format

I’ve a .atlas format texture atlas which I found online. I want to convert it to .json format texture atlas. How can I do so?

Thanks :slight_smile:

What’s the .atlas format?

.atlas format is like below:

spineboy.png
"format": RGBA8888
"filter": Linear,Linear
"repeat": none
eye_indifferent
eye_surprised
  "rotate": false
  "xy": 592, 77
  "size": 56, 53
  "orig": 56, 53
  "offset": 0, 0
  "index": -1
front_bracer
  "rotate": false
  "xy": 491, 3
  "size": 35, 48
  "orig": 35, 48
  "offset": 0, 0
  "index": -1
front_fist_closed
  "rotate": false
  "xy": 444, 2
  "size": 45, 49
  "orig": 45, 49
  "offset": 0, 0
  "index": -1

Texture packer allows to pack in that format. Lot of other engines as well as cocos allows to read that, I guess.

Interesting. Thanks for the info.
Looks easy to parse if one wanted to convert to another container format (XML, JSON, etc).

Yeah… I found the parser online. But the problem is, it has to take care if rotate: true
in which case width becomes height and vice versa.

I wanted to use it in DragonBones, so had to convert it to .plist and then .plist->.json format.

So did you already solve this or do you still have question or feature request?

I finally had to settle to the fact that the parser that I found online is still to be customized to give correct results. :stuck_out_tongue:

But that was unnecessary task. I just wanted to import things in DragonBones which I now realized that .atlas can be directly read in DragonBones.

I was facing problem because of following things: (Check my comments at this post)

DragonBones has minor bugs here and there. DragonBones is terrible at support. So, they don’t really respond to the issues raised at github. It has literally no community. Surprisingly, it is really a great tool. But lot of chinese, very very minimal support for English. No tutorials form community side but only handful of 1-2 min tutorials by the developers! This great tool works but also sucks.
But I am still using it since, there is no other free tool which is as good competitor to Spine.
And I’ve no idea if the animation created in DragonBones will work in Cocos2d-x v3.14 :stuck_out_tongue:

1 Like