Orientation of TGA generated by nconvert

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

lzn11
Posts: 1
Joined: Thu Mar 01, 2012 4:56 am

Orientation of TGA generated by nconvert

Post by lzn11 »

I'm using nconvert.exe to convert some images into tga format.

The info of the converted tga is like this:

Format : Truevision TARGA (Type 10)
Name : tga
Compression : Rle
Width : 256
Height : 256
Components per pixel : 3
Bits per component : 8
Depth : 24
# colors : 16777216
Color model : RGB
Bytes Per Plane : 800
Orientation : Top Left
Xdpi : Not set
Ydpi : Not set
Page(s) : 1

while a normal tga file generated by any other software is like this:

Format : Truevision TARGA (Type 10)
Name : tga
Compression : Rle
Width : 256
Height : 256
Components per pixel : 3
Bits per component : 8
Depth : 24
# colors : 16777216
Color model : RGB
Bytes Per Plane : 800
Orientation : Bottom Left
Xdpi : Not set
Ydpi : Not set
Page(s) : 1

The difference lies in the orientation, and it has caused my images to be displayed in the wrong direction.(The tga images are used by a game engine)
Is there an option to correct the orientation?
User avatar
xnview
Author of XnView
Posts: 45815
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Orientation of TGA generated by nconvert

Post by xnview »

No, the origin used is always top-left
Pierre.
User avatar
caveman2
Posts: 2
Joined: Wed Nov 30, 2011 9:41 pm
Location: Strasbourg, France

Re: Orientation of TGA generated by nconvert

Post by caveman2 »

lzn11 wrote:The difference lies in the orientation, and it has caused my images to be displayed in the wrong direction.(The tga images are used by a game engine)
Is there an option to correct the orientation?
What you could do is vertically flip your pictures before you convert them into TGA files.
Apparently your game does not check the orientation.