image conversion - Forum

Forum Navigation
You need to log in to create posts and topics.

image conversion

Anyone know of a good plugin to convert image formats? I need to convert .dds to .png.

Thanks!

Hi @wrangler ,If you don't mind using external command line programs, Nconvert is a powerful command line multi-platform batch image processor with more than 80 commands. Compatible with 500 image formats. It is freeware for non-commercial use.

Regards

CN_Iceman has reacted to this post.
CN_Iceman

We could certainly use a good image plugin that would allow us to drag and drop and image (not a polygon, too limited) and also be able to resize the image by pulling on the grips.

 

Anyone  know of something like that?

@donbwalker

Try the asPicture 3.0 plugin (Andrei Solodyankin)

donbwalker has reacted to this post.
donbwalker

I can't get nconvert to work for me. Can you give me a command line to convert filename1.dds to filename2.png?

@wrangler

nconvert -out png filename1.dds  filename2.png

read the usage.txt document

it seems that the correct way is:

nconvert -out png filename1.dds

nconvert already generate the same name with output extension.

 

Thank you for the sample code. It still doesn't work. Code used:

Run "[pubdir]convert\nconvert.exe" "-out png [pubdir]convert\store_[tad1].dds [pubdir]convert\store_[tad1].png" "Normal" "" ""
setvar "[convertimage]" "[pubdir]convert\store_[tad1].png"

The tad1 variable contains the filename without the extension. No errors in the debug window. Can you spot anything I've done wrong?

@wrangler

Try create BAT file with complete command and then start from RUN command. as a BAT file

Run "[pubdir]Test.bat"

Usually when I have problem with command-line parameters (similar to yours) in RUN command I just create a BAT file and...voila, everything working OK.

I don't know why, but it's works, at least for me :-)

 

Cheers!

I always use this way as @dglojnar says... by creating a .BAT file and then deleting it.

You may try:

Run "[pubdir]convert\nconvert.exe" "-out png [#34][pubdir]convert\store_[tad1].dds[#34] [#34][pubdir]convert\store_[tad1].png[#34]" "Normal" "" ""

 

luishp has reacted to this post.
luishp

@hpw

This works, but it creates 2 of the png and they are pixelated. See attached file.

 

Run "[pubdir]convert\nconvert.exe" "-out png [#34][pubdir]convert\store_[tad1].dds[#34] [#34][pubdir]convert\store_[tad1].png[#34]" "Normal" "" ""
This is the code I used for bat file:
FileWrite "[pubdir]convert.bat" "All" "CD [pubdir]convert"
FileWrite "[pubdir]convert.bat" "2" "start nconvert.exe -out png store_[tad1].dds store_[tad1].png"
Run "[pubdir]convert.bat" "" "RunOnce+Hidden" "" ""
setvar "[convertimage]" "[pubdir]convert\store_[tad1].png"
Does the same thing. Also creates 2 copies. Tried on several different dds files.
Uploaded files:
  • You need to login to have access to uploads.

@wrangler eliminate the output file, it seems nconvert writes the same name with the converted extension

nconvert.exe -out png sample.dds

that's why you should always read the help ;-)

Thanks, @emo. That fixed the multiple copies of the png. But the graphic is still pixelated as shown above.

@wrangler , It seems that the DDS format can become quite complex, with multiple compression options, erroneous headers in old formats and multiple textures. If you can not find out what options they have used to generate them (possibly from a game) it may be useful to take a look at this page, or in the nconvert forum.

 

I want to thank everyone for their input on this. I really didn't think it would be that difficult to convert an image format. This is the code that worked for me:

 

Run "[pubdir]menufiles\convert.exe" "[#34][shortgamepath]data\vehicles\[tad2]\store_[tad1].dds[#34] [#34][pubdir]convert\store_[tad1].png[#34]" "Hidden" "" ""

 

I ended up using ImageMagick to get it done. I think it had to do with the formatting of the .dds image. As Emo stated, it's complex. Don't know why nconvert wouldn't work and ImageMagick did, but it's done.

 

https://imagemagick.org/index.php

 

On to the next challenge.......

CN_Iceman has reacted to this post.
CN_Iceman

call me if you want.