Resize so that width is multiple of 4

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

Moderators: helmut, XnTriq, xnview

Post Reply
zedrummer
Posts: 1
Joined: Thu Nov 26, 2009 8:29 am

Resize so that width is multiple of 4

Post by zedrummer »

Hello
I use textures for my 3D programming and I would be interested in automatically resize pictures so that they have a width that is a multiple of 4 (as OpenGL only accept that). For example, if the width is a 32bit unsigned integer, performing a bitwise AND 0xFFFFFFFC to get the immediate smaller size multiple of 4. Is there an easy way to do something like that with NConvert? If not, is there an easy way for a program in C calling NConvert to get the size?
Thanks
Cathy L.
Post Reply