Issue with resize percentage (DDS)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
LDAsh
Posts: 35
Joined: 2015-04-27T23:10:58-07:00
Authentication code: 6789

Issue with resize percentage (DDS)

Post by LDAsh »

Hi folks, I have been trying to figure this out all morning.

I'm trying to convert a bunch of DDS files by 50% and retain their DXT type, their type of alpha, because they are mixed. Here is my command:-

Code: Select all

mogrify *.dds -resize 50% -filter Mitchell -sharpen 1 *.dds
but here's how it looks in the DOS window:-

Code: Select all

C:\decals>mogrify -resize 50 -filter Mitchell -sharpen 1 *.dds
I've tried a few combinations, 50%, 50x50%, 50%x50%. The result is either no change in size, or all become 50x50 pixels. I can't get them down to 50% no matter what I try. Not sure if it's because of my source (DDS) images, the software itself or something with my .BAT file.

Any suggestions?
Thanks.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Issue with resize percentage (DDS)

Post by snibgo »

In a BAT file, % is a special character. It is a prefix to an argument, eg %1, %2. So you need to double yours: 50%%.
snibgo's IM pages: im.snibgo.com
tom_dl
Posts: 43
Joined: 2015-02-26T08:25:44-07:00
Authentication code: 6789

Re: Issue with resize percentage (DDS)

Post by tom_dl »

Also, is your -filter aimed at the -resize command? If so, it should appear before, not after:

Code: Select all

mogrify *.dds -filter Mitchell -resize 50%% -sharpen 1 *.dds
LDAsh
Posts: 35
Joined: 2015-04-27T23:10:58-07:00
Authentication code: 6789

Re: Issue with resize percentage (DDS)

Post by LDAsh »

Thanks a million for the help. Seems to be working now, although I didn't test them in-game yet, I thank you very much anyway. :)
________

Just wanted to post a follow-up that I've tested the assets in the game engine - we didn't get any errors at all and they are all rendering as they should, as their original DXT types. Very good!
Post Reply