EsotericSoftware / spine-editor

Issue tracking for the Spine editor.
http://esotericsoftware.com/
29 stars 2 forks source link

Atlas packed in webp format cannot be unpacked by texture unpacker until you pack any textures in webp format #834

Open misaki-eymard opened 2 months ago

misaki-eymard commented 2 months ago

Description: If you run the texture unpacker and try to unpack the atlas in webp format, you may get an error. The workaround is to pack a skeleton's images into webp format once and then unpack it. Once the webp pack has been executed, unpacking any webp textures will work.

Expected behavior: You can unpack an atlas packed in webp format, even if you have never run a pack in webp format since you started Spine.

Steps to reproduce:

  1. Download the attached .zip file: webp-atlas.zip
  2. Run Spine 4.2.36.
  3. Open the Texture Unpacker window via the Spine menu.
  4. Specify the spineboy-pro.atlas in the Atlas file field, and set the output folder. Screenshot 2024-09-15 at 17 28 23
  5. Press the Unpack button, then you will see the following error: Screenshot 2024-09-15 at 17 27 34

If you open the log, you should find the following line:

ERROR: Unable to unpack atlas:
[error] Unable to read image file: <imagePath>webp-atlas/spineboy-pro.webp
   at s.giF._(_:104)
   at s.Iei._(_:141)
   at s.Yya._(_:588)
   at s.pUq._(_:610)
   at s.BPV._(_:65)
   at s.iWG._(_:98)
   at s.pbf._(_:47)
   at s.DsW._(_:186)
   at s.pbf._(_:50)
   at s.DeP._(_:211)
   at s.DeP.F(_:186)
   at s.Yya.I(_:1052)
   at s.LbZ.D(_:500)
   at s.lEc._(_:278)
   at s.lEc.D(_:230)
   at s.yjg.D(_:149)
   at s.atr.run(_:186)
   <events>
Cause: [error] Unknown image format.
   at s.cqN._(_:64)
   at s.giF._(_:101) ...

However, once you open any Spine project (e.g. Spineboy) and pack the skeleton images in webp format and then unpack them again with the texture unpacker, you will see that the error no longer occurs.

The version of Spine in which this issue was found: 4.2.36

This issue was reported in the following thread on the forum: https://ja.esotericsoftware.com/forum/d/26860-%E8%A7%A3%E5%8C%85%E8%B7%B3%E9%8C%AF%E8%AA%A4%E7%84%A1%E6%B3%95%E8%AE%80%E5%8F%96webp%E7%9A%84%E5%9C%96%E6%AA%94

misaki-eymard commented 2 months ago

We have also received reports that the same problem occurs when unpacking webp-format textures via CLI: https://esotericsoftware.com/forum/d/26944-not-able-to-unpack-altas-file-using-spine-cli-commands-for-webp-images