HearthSim / UnityPack

Python deserialization library for Unity3D Asset format
https://hearthsim.info/
MIT License
720 stars 153 forks source link

Image decoding error #15

Closed andburn closed 7 years ago

andburn commented 7 years ago

Noticed this error extracting the texture for card CFM_648, format problem maybe?

unityextract --images Hearthstone\Data\Win\cardtextures0.unity3d --filter HS9-007_M

Traceback (most recent call last):
  File ".\bin\unityextract", line 146, in <module>
    main()
  File ".\bin\unityextract", line 143, in main
    exit(app.run())
  File ".\bin\unityextract", line 56, in run
    self.handle_asset(asset)
  File ".\bin\unityextract", line 127, in handle_asset
    image = d.image
  File "python-unitypack\unitypack\engine\texture.py", line 175, in image
    return Image.frombytes(mode, size, data, codec, args)
  File "Python3.5.2\lib\site-packages\PIL\Image.py", line 2070, in frombytes
    im.frombytes(data, decoder_name, args)
  File "Python3.5.2\lib\site-packages\PIL\Image.py", line 744, in frombytes
    raise ValueError("not enough image data")
ValueError: not enough image data
robert-nix commented 7 years ago

The format is very likely .crn data, not raw dxt: https://github.com/BinomialLLC/crunch

andburn commented 7 years ago

Yep, you're right. That's annoying.

verng95 commented 7 years ago

I have the same error, as you ignore it and continue the algorithm?

FardHast commented 7 years ago

@andburn Almost the same error. Extracted 1923 arts out of 2818 needed. And then this error and program crashed. Please, I really hope you can do smth about it. exporting arts error

andburn commented 7 years ago

@FardHast yeah, different project but same problem. I added an issue for it https://github.com/andburn/hs-art-extractor/issues/6 will try and fix it soon.

FardHast commented 7 years ago

@andburn Thanks!

jleclanche commented 7 years ago

This was fixed!