IMG to PNG convert on Mac OSX

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

Moderators: XnTriq, helmut, xnview

Post Reply
graphyx
Posts: 3
Joined: Sat May 27, 2017 6:30 am

IMG to PNG convert on Mac OSX

Post by graphyx »

I've been looking for a way to convert IMG (Atari/Digital Research GEMpaint) files to something more common such as PNG and I was suggested XNconvert which does the job fine. I'm on the Mac OSX platform (OSX 10.9.5 Mavericks) and was hoping for a way to simply drag image files to an icon in the dock and have them converted to PNG.

XNconvert doesn't seem to allow that but someone suggested Nconvert to me which I've just downloaded. I've tried to make sense of the supplied files but am having trouble figuring it out:

1) how do I install it on a Mac?

2) how do I configure and make it possible to simply drag & drop IMG files to the dock and get them converted to PNG. Perhaps with an Applescript or Automator action. Has anyone done that?

3) I noticed that the Nconvert page says it's available for several platforms, among them the Atari (I suppose it's a reference to the Atari ST), but where do I download that version from? The download links don't show any Atari version.
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: IMG to PNG convert on Mac OSX

Post by xnview »

Nconvert is a command line tools, no install.
You should try XnConvert that can convert atari images
Pierre.
graphyx
Posts: 3
Joined: Sat May 27, 2017 6:30 am

Re: IMG to PNG convert on Mac OSX

Post by graphyx »

Yes, I know it's a command line tool, but it needs to be put somewhere on the hard drive so it can be accessed from the Terminal. I couldn't find any such info in the documentation (which is mostly for PCs).

EDIT: I didn't find it in the docs, but in this posting it says that the nconvert binary should be put inside /usr/local/bin/
so that question is solved at least :)


XnConvert works fine, but I was suggested NConvert because it might be easier to work with scripts and thus make it possible to easily allow drag & drop to the Mac Dock and have IMG files converted that way. Suggestions on how I can do this?

UPDATE: I suppose I can get help with the script-writing in a Mac-specific group as long as I get the command line syntax right.
Using the information I got when entering nconvert -help I got a basic conversion working (after first changing the directory (cd) to where the IMG files are located):

nconvert -out png -v -xall -keepfiledate *.IMG

But I have a couple of problems with this:
a) it will only recognize the same case extension for the input files. It would be nice if it would process .IMG as well as .img and .Img
b) it won't keep the original filedate (instead if gives the converted files the time/date when they were actually converted today).

On the other hand I tried converting the same files with XnConvert and I didn't have any of these problems.
Using the "Save script as..." function in XnConvert I was able to see the settings I had configured it to do. The script file looks like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?><XnView_script version="1.0" name="scripttest">
    <Output folder="/PATH/OF/MY/IMAGE/FOLDER/HERE/" filename="{Filename}" case="0" format="PNG">
        <Options overwrite="1" orgDate="true" keepMeta="true" keepICC="false" keepFolder="false" keepParentFolder="false" delOrg="false" multipage="false" allPages="false" openExplorer="false" openBrowser="false" clearItems="false"/>
        <PNG level="6" interlaced="false" filter="0"/>
    </Output>
</XnView_script>
Assuming nconvert and XnConvert is essentially the same software, what is the syntax for making NConvert do the same thing?
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: IMG to PNG convert on Mac OSX

Post by xnview »

graphyx wrote: a) it will only recognize the same case extension for the input files. It would be nice if it would process .IMG as well as .img and .Img
you need to add *.img *.Img ...
b) it won't keep the original filedate (instead if gives the converted files the time/date when they were actually converted today).
Keeping the original file date works only on windows, it's a known issue
Pierre.
graphyx
Posts: 3
Joined: Sat May 27, 2017 6:30 am

Re: IMG to PNG convert on Mac OSX

Post by graphyx »

xnview wrote:
graphyx wrote: a) it will only recognize the same case extension for the input files. It would be nice if it would process .IMG as well as .img and .Img
you need to add *.img *.Img ...
So the following should handle the different combinations (there's no parameter for ignoring the case)?

nconvert -out png -keepfiledate *.IMG *.img *.Img

b) it won't keep the original filedate (instead if gives the converted files the time/date when they were actually converted today).
Keeping the original file date works only on windows, it's a known issue
Is this a limitation with Nconvert or with Mac OSX?
So apparently the code from XnConvert is different from Nconvert: are there any plans to fix this in Nconvert?

Are there workarounds? Perhaps the "touch" command could be used, but how?
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: IMG to PNG convert on Mac OSX

Post by xnview »

graphyx wrote: So the following should handle the different combinations (there's no parameter for ignoring the case)?

nconvert -out png -keepfiledate *.IMG *.img *.Img
yes
Is this a limitation with Nconvert or with Mac OSX?
Linux & MacOSX
So apparently the code from XnConvert is different from Nconvert: are there any plans to fix this in Nconvert?
There is some differences, yes i'll try to fix it
Are there workarounds? Perhaps the "touch" command could be used, but how?

Code: Select all

touch -mt YYYYMMDDhhmm
Pierre.
Post Reply