crashinvaders/gdx-texture-packer-gui

On pack, source images deleted and pack does not work.

joelutting opened this issue · 3 comments

!!!

Latest version 4.9 just installed

tried several times

When I click pack - the source images I selected are deleted from my drive and the java error below appears in an error box.

Packing is started
[text-red]Exception occurred:[] Error reading image: E:\Joel Final Products\OperationWildFire\assets\enemies\sheets\enemy701.png
Can't read input file!
[text-red]Stack trace:[]
java.lang.RuntimeException: Error reading image: E:\Joel Final Products\OperationWildFire\assets\enemies\sheets\enemy701.png
at com.badlogic.gdx.tools.texturepacker.ImageProcessor.addImage(ImageProcessor.java:67)
at com.badlogic.gdx.tools.texturepacker.TexturePacker.pack(TexturePacker.java:170)
at com.crashinvaders.texturepackergui.controllers.packing.processors.PackingProcessor.performPacking(PackingProcessor.java:63)
at com.crashinvaders.texturepackergui.controllers.packing.processors.PackingProcessor.processPackage(PackingProcessor.java:40)
at com.crashinvaders.texturepackergui.utils.packprocessing.CompositePackProcessor.processPackage(CompositePackProcessor.java:20)
at com.crashinvaders.texturepackergui.utils.packprocessing.PackProcessingManager.lambda$execute$0(PackProcessingManager.java:60)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.imageio.IIOException: Can't read input file!
at javax.imageio.ImageIO.read(Unknown Source)
at com.badlogic.gdx.tools.texturepacker.ImageProcessor.addImage(ImageProcessor.java:65)
... 10 more

Hi there,
Sorry if you lost any important files, hope you had a copy.

I presume your "Output dir" matches the dir where the source images are located to, and the pack name (atlas) is also the same as the deleted image(s)?

If so we had this issue before and it seems like it's getting in the way too often.
In the next version, there will be an extra check that won't let you export the atlas to the same dir with any of the input images.

Please let me know if your case is a different one.

thats correct - normally I have different folders but this time it was the same - previously it had all worked fine - so I guess thats why.

Yeah, sorry again. I'm afraid that's just the specifics of the way the tool works and there's no an easy way to change it. So for now I'd just recommend to always use separate folders for inputs and output.