World's Stupidest Installer

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
zeppenwolf
Posts: 3
Joined: 2018-03-08T22:28:56-07:00
Authentication code: 1152

World's Stupidest Installer

Post by zeppenwolf »

Hey.

I'm a Macintosh (only!!) guy, and I'm in a situation where I need to generate a JPG or PNG ( I prefer PNG ) in 16 bit depth to accommodate someone else's software.

The overwhelming default is 8 bit, and the various freeware programs I know can't help-- Preview can't change the depth, Seashore can't change Depth, Chocoflop can sort of change depth, but only in the Chocoflop format, and when I try to save as JPG or PNG it helpfully reverts to 8 bit depth...

So I went looking for something else, maybe UNIX command line tool, and, here I am, because I notice the --depth parameter to ImageMagick.

I really wish I could have just d'loaded an executable, but that didn't seem to be available, so I tried to Go With The Flow. I was instructed to DL macports if I didn't have it, so I did that. Then I was instructed to "sudo port install ImageMagick" so I did that. I ran into a problem, that the Xcode command line tools weren't installed, so I tried to do that. I ran into a problem, that I didn't have enough disk space, so I deleted a bunch of schloss, and then installed all the Xcode tools without problem. Allegedly.

But then I kept trying "sudo port install ImageMagick" and nothing really happened-- doing a global find on "Magick" found ten bazillion files, but no executable or application, just a trillion C source files and whatnot.

So eventually I gave up, sorta, and deleted every folder containing the name "Magick", and tried once again to ""sudo port install ImageMagick"

But that didn't work either:

Error: Unable to open port: couldn't change working directory to "/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/ImageMagick": no such file or directory

Well, shoot. So I manually created that directory, and then I got this:

Error: Unable to open port: Could not find Portfile in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/ImageMagick

I'm smart enough to recognize a bottomless pit when I see one.


For The Love Of Ozzy, can you help me get a working executable?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: World's Stupidest Installer

Post by fmw42 »

Sounds like you did not follow instructions in the correct order or do not have a good install of MacPorts. Perhaps you installed the wrong version of MacPorts for you Mac OSX version.

See https://www.macports.org and https://guide.macports.org and https://guide.macports.org/#using.port

After installing Xcode tools, try updating MacPorts (sudo port selfupdate) or reinstalling it from scratch then do the self update. Then do sudo port clean ImageMagick. Then try again with sudo port install ImageMagick.

What is your Mac OSX version? If compatible, you can get the High Sierra ImageMagick version at https://www.imagemagick.org/script/download.php#macosx

If all else fails, remove MacPorts and try using Homebrew (https://brew.sh)
zeppenwolf
Posts: 3
Joined: 2018-03-08T22:28:56-07:00
Authentication code: 1152

Re: World's Stupidest Installer

Post by zeppenwolf »

Thank you a gazillion times for all the homework.

I tried, really really I tried, to get MacPorts to work, by uninstalling then installing, then uninstalling and cleaning and installing,etc, but it never would install without choking. My hard drive is partitioned like seven times or something, for OSX startup disks from Snow Leopard on up, and I'm currently most comfortable doing my work on the Mavericks partition. I know, it's a bit old, but...

> Sounds like you did not follow instructions in the correct order

Well, I've already admitted to being the World's Stupidest Installer... but I do have a degree in CS, and if I didn't get much out of that degree, I'm pretty sure I can follow directions. The MacPorts thing just wouldn't work. So I took your advice and tried Homebrew, and... I have an executable! Yay!

But I still can't get no satisfaction.

I want to convert an existing png from 8 bit to 16 bit:

[dir] magick -depth 16 SrcFile.png OutFile.png

Runs fine, but OutFile.png still identifies as 8 bit. ( !!! God*&%&**$%OZZY^%^&&#$^%!!!! )

I'ts 4th down and 1 yard to go, I feel like... Can you get me there? TIA,
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: World's Stupidest Installer

Post by fmw42 »

Not sure why you are having trouble with MacPorts. I have had no problems. But I use it to install all my delegates and then install ImageMagick from source. Probably not what you want to do.

Is your ImageMagick install Q16 or Q8?

Code: Select all

magick -version 
will tell you.

ImageMagick 7 is less forgiving of syntax errors. So try

Code: Select all

magick SrcFile.png -depth 16 OutFile.png
If that does not work, then post your input png to some free hosting service such as dropbox.com that will not change its format and put the URL here.

If your input is 8-bits, then the output will be 16/8-bits. That means it still has only 8-bits of information, but is stretched out to 16-bits.

What are you trying to do? Is your input 8-bits per channel pixel or 8-bits per total image pixel?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: World's Stupidest Installer

Post by snibgo »

Try:

Code: Select all

magick SrcFile.png PNG48:OutFile.png
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: World's Stupidest Installer

Post by fmw42 »

snibgo, you beat me to it. I just double checked and it is true that without PNG48: even with -depth 16, the result is 8-bit and not 16/8-bit.

see https://www.imagemagick.org/Usage/formats/#png
zeppenwolf
Posts: 3
Joined: 2018-03-08T22:28:56-07:00
Authentication code: 1152

Re: World's Stupidest Installer

Post by zeppenwolf »

IT WORKS !!!

> "magick SrcFile.png PNG48:OutFile.png"

tNhaks so much, snibgo ! ( how do I pronounce that, by the way? Does it rhyme with "Furzibgo" ? )

Everyone who has read this thread so far... can you imagine how frustrated I was?

BUT... All is swell that ends swell... thx to everybody.
Post Reply