NormalMap-Online icon indicating copy to clipboard operation
NormalMap-Online copied to clipboard

Add TGA File Support

Open zauberparacelsus opened this issue 8 years ago • 7 comments

Would it be possible to add support for loading TGA image files? A lot of my texture files are in TGA format, and I need to convert them first if I want to use them with Normal Map Online

zauberparacelsus avatar Dec 12 '16 14:12 zauberparacelsus

Do you mean a *.tga file as heightmap input or as a diffuse map?

cpetry avatar Dec 28 '16 12:12 cpetry

As a heightmap input for generating the normal maps from

zauberparacelsus avatar Dec 28 '16 14:12 zauberparacelsus

Well I tried using a *.tga image, generated with Paint.NET, and it worked. Could you send me one of your images that won't work? Perhaps they have some special settings not known to the tga library I use.

cpetry avatar Dec 29 '16 13:12 cpetry

Here's one file: https://drive.google.com/open?id=0By8mCRAK59fGd3ZWQVlmT1ZsdE0

And to clarify my problem, when I try to load a .tga file either by file dialog or by drag-and-drop, nothing happens. It just ignores the load attempt and doesn't give any output.

zauberparacelsus avatar Dec 29 '16 13:12 zauberparacelsus

Mh I tried it now with both Firefox and Chrome. Both worked fine. Can you give me the javascript log? Perhaps we can get some clues from that. Which browser do you use?

cpetry avatar Dec 29 '16 14:12 cpetry

I'm using Chrome 55, on 64bit Ubuntu 16.10

And I don't know how to access the javascript log.

zauberparacelsus avatar Dec 29 '16 15:12 zauberparacelsus

height                                                               filedrop.js:49:11
TypeError: readImageCallback is not a function                       filedrop.js:147:4
    onload https://cpetry.github.io/NormalMap-Online/javascripts/filedrop.js:147
loading height image filedrop.js:162:12

height                                                               filedrop.js:49:11
TypeError: readImageCallback is not a function                       filedrop.js:147:4
    onload https://cpetry.github.io/NormalMap-Online/javascripts/filedrop.js:147

I clicked to upload a file (rather than drag+drop). First upload was a PNG and worked, logging that loading height image message.

Second upload was a TGA (of the same image) and returned nothing after that TypeError.

hemebond avatar Mar 17 '20 08:03 hemebond