This beta adds support for TIF/TIFF and TGA. It is not complete, but should allow converting between the formats.
http://www.mediafire.com/file/akhpz3yh1o...1.zip/file
Some things to note:
- Input images can now be TGA, TIF, or TIFF. All operations now support them, but only ImageMagick upscaling filters are currently supported (Point/Cubic).
- Output images can now be TGA or TIFF when in Expert Mode. Outputting TIF is not possible through GUI, although I can add it if necessary.
- JPG was also moved to Expert Mode for convert/rescale. IIRC Dolphin doesn't support JPG anymore, nor should it be used for texture packs anyway.
- Multi-image TIF/TIFF files may not be currently supported or work correctly.
Things to look out for:
- Any bugs or unexpected behavior. There are about 6 places in the script that reference image formats, and I'm known to break stuff.
- ImageMagick by default flips TGA files. I have a work-around in place (-flip parameter), but I don't know if this was local to me, a bug, or expected behavior.
@Ridiculous_Death: After reading your post more closely, I have some questions and some things to mention.
I'm not sure what you mean by this, can you explain in a bit more detail? Whether you mean a separate texture for the mask, or a texture with alpha, all PNG textures are created with 32-bit depth. An example image or screenshot of the damage would be useful.
Again not sure what you mean by "missing parts". Again an example image or screenshot would be very useful.
And one thing to keep in mind: this tool is limited by the programs it uses. The current beta is as far as it goes for natively supporting TIFF and TGA. ImageMagick, Compressonator, and TexConv all natively support both formats, so its quite simple to convert between them. Converting/Rescaling operations should now work when converting any format to any format.
As for other the upscaling programs: xBRZ, Waifu2x, ESRGAN, and SFTGAN, I have not tested most of these but I know xBRZ does not support either TIFF or TGA. So in this situation the image must be converted to PNG before upscaling. If the other upscaling programs do not support these formats natively, then the same method needs to be applied. Which means if converting TIFF or TGA to PNG loses data (I don't know if it does), there really isn't much I can do about that.
Last, if you can send me a few TGA and TIFF images so I can get an idea of what you are working with, I would appreciate it!
@djneo: If you're still around, just out of curiosity, have you tried generating those problematic textures as BC7 without mipmaps and testing in-game?
I noticed it has "m" in the name: tex1_1024x1024_m_e96aa72b1a32f7f3_14.png
This may cause shimmering in the distance, but it might just be weird enough to fix the issue. Alternatively, if shimmering is bad, you can try less levels like 1 or 2 and see if that works.
If it doesn't fix the issue, I do suggest lowering the levels even for ARGB8 as each level will add size to the texture, which partially explains why they are so large. You may need to experiment.
http://www.mediafire.com/file/akhpz3yh1o...1.zip/file
Some things to note:
- Input images can now be TGA, TIF, or TIFF. All operations now support them, but only ImageMagick upscaling filters are currently supported (Point/Cubic).
- Output images can now be TGA or TIFF when in Expert Mode. Outputting TIF is not possible through GUI, although I can add it if necessary.
- JPG was also moved to Expert Mode for convert/rescale. IIRC Dolphin doesn't support JPG anymore, nor should it be used for texture packs anyway.
- Multi-image TIF/TIFF files may not be currently supported or work correctly.
Things to look out for:
- Any bugs or unexpected behavior. There are about 6 places in the script that reference image formats, and I'm known to break stuff.
- ImageMagick by default flips TGA files. I have a work-around in place (-flip parameter), but I don't know if this was local to me, a bug, or expected behavior.
@Ridiculous_Death: After reading your post more closely, I have some questions and some things to mention.
(11-06-2019, 12:22 AM)Ridiculous_Death Wrote: As 32bit transparency mask is damaged on converting/upscaling with PNG...
I'm not sure what you mean by this, can you explain in a bit more detail? Whether you mean a separate texture for the mask, or a texture with alpha, all PNG textures are created with 32-bit depth. An example image or screenshot of the damage would be useful.
(11-06-2019, 12:22 AM)Ridiculous_Death Wrote: ...and textures becoming unusable with missing parts.
Again not sure what you mean by "missing parts". Again an example image or screenshot would be very useful.
And one thing to keep in mind: this tool is limited by the programs it uses. The current beta is as far as it goes for natively supporting TIFF and TGA. ImageMagick, Compressonator, and TexConv all natively support both formats, so its quite simple to convert between them. Converting/Rescaling operations should now work when converting any format to any format.
As for other the upscaling programs: xBRZ, Waifu2x, ESRGAN, and SFTGAN, I have not tested most of these but I know xBRZ does not support either TIFF or TGA. So in this situation the image must be converted to PNG before upscaling. If the other upscaling programs do not support these formats natively, then the same method needs to be applied. Which means if converting TIFF or TGA to PNG loses data (I don't know if it does), there really isn't much I can do about that.
Last, if you can send me a few TGA and TIFF images so I can get an idea of what you are working with, I would appreciate it!
@djneo: If you're still around, just out of curiosity, have you tried generating those problematic textures as BC7 without mipmaps and testing in-game?
I noticed it has "m" in the name: tex1_1024x1024_m_e96aa72b1a32f7f3_14.png
This may cause shimmering in the distance, but it might just be weird enough to fix the issue. Alternatively, if shimmering is bad, you can try less levels like 1 or 2 and see if that works.
If it doesn't fix the issue, I do suggest lowering the levels even for ARGB8 as each level will add size to the texture, which partially explains why they are so large. You may need to experiment.