minetest-tools / mcresconvert

Convert Minecraft Resource and Texture Packs to Minetest Texture Packs
35 stars 14 forks source link

imageconvert errors/warnings #18

Closed ensonic closed 6 years ago

ensonic commented 7 years ago

I get a bunch of errors from imagemagic

convert.im6: geometry does not contain image `_n/blocks/planks_oak.png' @ warning/transform.c/CropImage/574.
convert.im6: geometry does not contain image `_n/blocks/planks_spruce.png' @ warning/transform.c/CropImage/574.
convert.im6: geometry does not contain image `_n/blocks/planks_birch.png' @ warning/transform.c/CropImage/574.
convert.im6: geometry does not contain image `_n/entity/chest/normal.png' @ warning/transform.c/CropImage/574.
convert.im6: geometry does not contain image `_n/entity/chest/normal.png' @ warning/transform.c/CropImage/574.
convert.im6: geometry does not contain image `sun.png' @ warning/attribute.c/GetImageBoundingBox/243.
composite.im6: unable to open image `_n/m.png': No such file or directory @ error/blob.c/OpenBlob/2641.
composite.im6: unable to open file `_n/m.png' @ error/png.c/ReadPNGImage/3667.
composite.im6: missing an image filename `_n/o.png' @ error/composite.c/CompositeImageCommand/1621.
convert.im6: unable to open image `_n/o.png': No such file or directory @ error/blob.c/OpenBlob/2641.
convert.im6: unable to open file `_n/o.png' @ error/png.c/ReadPNGImage/3667.
convert.im6: no images defined `default_mineral_mese.png' @ error/convert.c/ConvertImageCommand/3044.

1.) Regarding the fences the commands are like this:

convert blocks/planks_oak.png \( -clone 0 -crop 256x64+0+96 -rotate 90 -gravity center \) -composite /tmp/default_fence_wood.png

the source is 64x64. Why do we try to crop 256x64 with a 0x96 offset if the source is 64x64. A command like

convert blocks/planks_oak.png \( -clone 0 -rotate 90 -gravity center \) -composite /tmp/default_fence_wood.png

works fine. What if we extract a function to create the fences to avoid the code duplication and then check the sizes first.

If this is also a case of a bad theme, it would be awesome if you could add a link to what these reference you use to the README. I've been looking at e.g. http://minecraft.gamepedia.com/Resource_pack

sofar commented 7 years ago

Could be an ImageMagick version problem. The IM commands change per version, and often in an incompatible way. Maybe just change the code in the way that works for you and PR that?