nintai83 Posted June 12, 2010 Share Posted June 12, 2010 I am using Jasc PSP 9 which doesn't process dds files. I am trying to convert "jpg/bmp/png/gif/etc" images to .dds using dds converter v21. Before the conversion process initiates I receive the following lines of message... -------Conversion from [JPG] to [DDS] using [nvDXT] started...Error: [XXXXX.jpg] size = not a power of 2Conversion has failed------- How do I size an image to the power of 2? I looked this up on wikipidia and it looked quite complicated. Initially I thought it would simply be an image that is as long vertically as it is horizontally but this did not work. Don't tell me I need a power if two image resizing program before I convert my converted image to a .dds file? That would be epic-I would play "Eye of the Tiger" and look really serious whilst I carried out this process lmao. Am I going about this the wrong way? I have a feeling I am making this more complicated than it is.Thanks in advance for any advice provided. Link to comment Share on other sites More sharing options...
_frost_ Posted June 12, 2010 Share Posted June 12, 2010 This is important: Fast algorithm to check if a positive number is a power of two The binary representation of integers makes it possible to apply a very fast test to determine whether a given positive integer x is a power of two: positive x is a power of two \scriptstyle\Leftrightarrow (x & (x − 1)) equals zero. where & is a bitwise logical AND operator. Note that if x is 0, this incorrectly indicates that 0 is a power of two, so this check only works if x > 0. Use the calculator (windows7) and choose programmer(means view==> programmer)It's because of the "and" function.But I think it means that you have to choose numbers like 2 4 8 16 32 64 128 256 512 etc. (power of 2) _frost_ Link to comment Share on other sites More sharing options...
nintai83 Posted June 12, 2010 Author Share Posted June 12, 2010 This is important: Fast algorithm to check if a positive number is a power of two The binary representation of integers makes it possible to apply a very fast test to determine whether a given positive integer x is a power of two: positive x is a power of two \scriptstyle\Leftrightarrow (x & (x − 1)) equals zero. where & is a bitwise logical AND operator. Note that if x is 0, this incorrectly indicates that 0 is a power of two, so this check only works if x > 0. Use the calculator (windows7) and choose programmer(means view==> programmer)It's because of the "and" function.But I think it means that you have to choose numbers like 2 4 8 16 32 64 128 256 512 etc. (power of 2) _frost_ Thank you very much. This formula makes sense to me. This is exactly what I was looking for. + kudos :) Link to comment Share on other sites More sharing options...
_frost_ Posted June 12, 2010 Share Posted June 12, 2010 You're welcome. I think I go to bed now - it's 3am my time ;]. Good night. _frost_ Link to comment Share on other sites More sharing options...
Recommended Posts