DDS format / mipmaps parameter
-
- Posts: 5
- Joined: 2015-03-08T14:44:54-07:00
- Authentication code: 6789
DDS format / mipmaps parameter
Hi,
i''m trying the convert files to DDS
and it seems that dds:mipmaps is not working
convert -format dds -define dds:mipmaps=5 -define dds:compression=dxt1 Sudoku1.png Sudoku1.dds
dds:compression works fine, but not mipmaps
Have seen in the source code some "skip mipmaps", was it releavant ?
Thanks !
i''m trying the convert files to DDS
and it seems that dds:mipmaps is not working
convert -format dds -define dds:mipmaps=5 -define dds:compression=dxt1 Sudoku1.png Sudoku1.dds
dds:compression works fine, but not mipmaps
Have seen in the source code some "skip mipmaps", was it releavant ?
Thanks !
Re: DDS format / mipmaps parameter
How do you know that the mipmaps are not working?
-
- Posts: 5
- Joined: 2015-03-08T14:44:54-07:00
- Authentication code: 6789
Re: DDS format / mipmaps parameter
Hi,
I tried to load the DDS file under Photoshop with NVIDIA Texture extension that reveal mipmaps
I tried to load the DDS file under Photoshop with NVIDIA Texture extension that reveal mipmaps
Re: DDS format / mipmaps parameter
Is the size of your image a square root of two?
-
- Posts: 5
- Joined: 2015-03-08T14:44:54-07:00
- Authentication code: 6789
-
- Posts: 5
- Joined: 2015-03-08T14:44:54-07:00
- Authentication code: 6789
Re: DDS format / mipmaps parameter
Hey there,
here's some output file
I test on severals DDS reader and i'm pretty sure IM don't generate mipmap
Is it a IM bug ?
Original image :
http://s000.tinyupload.com/?file_id=028 ... 6611448232
With IM
http://s000.tinyupload.com/?file_id=307 ... 6001547879
With Photoshop and Nvidia DDS creator
with mipmap
http://s000.tinyupload.com/index.php?fi ... 2832531134
without mipmap
http://s000.tinyupload.com/index.php?fi ... 6383862298
here's some output file
I test on severals DDS reader and i'm pretty sure IM don't generate mipmap
Is it a IM bug ?
Original image :
http://s000.tinyupload.com/?file_id=028 ... 6611448232
With IM
http://s000.tinyupload.com/?file_id=307 ... 6001547879
With Photoshop and Nvidia DDS creator
with mipmap
http://s000.tinyupload.com/index.php?fi ... 2832531134
without mipmap
http://s000.tinyupload.com/index.php?fi ... 6383862298
-
- Posts: 5
- Joined: 2015-03-08T14:44:54-07:00
- Authentication code: 6789
Re: DDS format / mipmaps parameter
Of course, here's the square of 2 management :
Code: Select all
LImage.SourceDimensionX = image.Width
LImage.SourceDimensionY = image.Height
Dim width_def As Integer = LImage.SourceDimensionX
Dim height_def As Integer = LImage.SourceDimensionY
If (LImage.SourceDimensionX Mod 4 > 0) Then width_def = LImage.SourceDimensionX - (LImage.SourceDimensionX Mod 4) + 4
If (LImage.SourceDimensionY Mod 4 > 0) Then height_def = LImage.SourceDimensionY - (LImage.SourceDimensionY Mod 4) + 4
If (width_def > LImage.SourceDimensionX) Or (height_def > LImage.SourceDimensionY) Then
image.Extent(width_def, height_def, Gravity.Center)
End If
Re: DDS format / mipmaps parameter
That code does not look valid. Your image should be square and be a power of two. (128, 256, 512). Sorry for using an incorrect term earlier, English is not my native language.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: DDS format / mipmaps parameter
?? 128 and 512 are powers of 2, but are not squares. Number that are both square, and powers of 2, would include 4, 16, 64, 256, 1024.
snibgo's IM pages: im.snibgo.com
Re: DDS format / mipmaps parameter
The image should be square e.g. 128x128, 256x256. Once more I apologize for the confusion...