Graphics advice for a new MacBook Pro user

Thoughts, Help, Feature Requests

Moderators: dorpond, trevor, Azhrei

Post Reply
User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Graphics advice for a new MacBook Pro user

Post by Azhrei »

I tried to make my topic title clear enough that non-Mac users will know they can skip this thread. :)

I bought a MBP about 4 weeks ago and have only recently been able to start using it full-time (it's a business thing :)). Anyway, I'm trying to learn the OSX way of doing things and I must be missing something.

I figured out how to use Automator to convert a bunch of JPEGs to PNGs (very cool!). But the problem was in creating the JPEGs in the first place. I was starting with the 456x608 images that RPTroll provided that show portraits of male elves, female elves, and so forth. Each image was a collage with 48 sub-images. I found that I could use Automator to crop images, but I didn't see any way to take the 48 sub-images (6 cols, 8 rows) out of the original JPEG and create new images. I ended up using the convert program from the ImageMagick suite on my Linux laptop instead, combined with a couple of nested for loops in bash. The pseudo-code would look something like:

Code: Select all

for row in 0 75 150 225 300 375 450 525
    for col in 0 75 150 225 300 375
        convert $inputfile -crop 75x75+$col+$row $outputfile
Of course, that's not the actual code, since the syntax is wrong (:)). Plus, there's a one-pixel gap between sub-images so I had to adjust the positions a little.

Anyway, I couldn't find any way to do this on my Mac using the built-in tools. Of course, I could probably get ImageMagick for OSX, but I wanted to try to do this using just standard tools. If anyone can help me with this, I'd appreciate it.

In the mean time, I'm going to grab ffmpeg off the web so that I can convert my TiVo video into MPEG-4. (And yes, that's the next challenge with OSX -- can this be done using pre-installed tools?)

Thanks for your help!

The Zapper
Cave Troll
Posts: 27
Joined: Thu Apr 09, 2009 1:16 pm

Re: Graphics advice for a new MacBook Pro user

Post by The Zapper »

You're going to love this.

You can do all of this rapidly just by opening up an image in Preview, or any other app you like.

CMD-SHIFT-3 is a regular screenshot.

CMD-SHIFT-4 is a screenshot that lets you select the area of the screen you want to shoot. By default, macs take screenshots as .png files, but you can change the default output format by messing with the System preferences. You can change it to .jpg, for instance :)

Done. Just take a selective screenshot of every section you want, and a png, or jpg, or whatever you want will appear on your desktop.

ALSO USEFUL:

CMD-SHIFT-OPTION-4 will let you selectively screenshot, but the output will go to your clipboard instead of to a file. I use this ALL the darn time, for a hundred different things.

Cheers :)

User avatar
zEal
Dragon
Posts: 944
Joined: Sun Mar 22, 2009 2:25 am

Re: Graphics advice for a new MacBook Pro user

Post by zEal »

Yay for necromancy >.>

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Graphics advice for a new MacBook Pro user

Post by Azhrei »

The Zapper wrote:You're going to love this.
Actually, I know about this (now). But I would still want an automated approach. I needed each "sheet" to be split into about 80 images. And I had 4 or 5 sheets.

Sorry, but there's no way (!) I was going to do that one by one, nor with a many select-copy-paste keystroke either.
zEal wrote:Yay for necromancy >.>
Now, now... He thought he was being helpful. ;)

User avatar
keithcurtis
Giant
Posts: 129
Joined: Fri Mar 02, 2007 3:18 am
Contact:

Re: Graphics advice for a new MacBook Pro user

Post by keithcurtis »

Do you have Photoshop? It should be dead easy to do with slices. Even Illustrator will do this in a pinch.

The Zapper
Cave Troll
Posts: 27
Joined: Thu Apr 09, 2009 1:16 pm

Re: Graphics advice for a new MacBook Pro user

Post by The Zapper »

Azhrei wrote:
The Zapper wrote:You're going to love this.
Actually, I know about this (now). But I would still want an automated approach. I needed each "sheet" to be split into about 80 images. And I had 4 or 5 sheets.

Sorry, but there's no way (!) I was going to do that one by one, nor with a many select-copy-paste keystroke either.
zEal wrote:Yay for necromancy >.>
Now, now... He thought he was being helpful. ;)
Actually... this showed up on the front page for me. I had no idea it was 2 years old.

User avatar
keithcurtis
Giant
Posts: 129
Joined: Fri Mar 02, 2007 3:18 am
Contact:

Re: Graphics advice for a new MacBook Pro user

Post by keithcurtis »

The Zapper wrote:Actually... this showed up on the front page for me. I had no idea it was 2 years old.
Heh, I didn't even check the date. I thought that Azhrei was a longer-time Mac user than that.

How did you solve your problem way back when, sir?

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Graphics advice for a new MacBook Pro user

Post by Azhrei »

keithcurtis wrote:Heh, I didn't even check the date. I thought that Azhrei was a longer-time Mac user than that.
Got my MacBook Pro in Aug '06.
How did you solve your problem way back when, sir?
In the first post, third paragraph: I used the convert program from ImageMagick to split them up. A nested loop that took about 30 seconds to run, but took me almost 20 minutes to get the syntax right for the command line options. (convert is not a program I use a lot. :))

Oh, and I did the work on a Linux machine in my office and not on the Mac, since the Linux box already had ImageMagick installed. I'm not thrilled with either MacPorts nor Fink for installing open source on OSX, so I just booted the problem to a different OS. ;)

jwdavidson
Kobold
Posts: 17
Joined: Mon Jan 26, 2009 3:58 am

Re: Graphics advice for a new MacBook Pro user

Post by jwdavidson »

sorry to continue resurrecting this thread, but i just wanted to point out that there is (and has been for years) a very nice OS X installer package for imagemagick:

http://www.entropy.ch/software/macosx/w ... magemagick

also, imagemagick compiles happily from source if you install the developer tools (free download from http://developer.apple.com if they didn't ship the dvd with your computer)

i've used this to good effect on several occasions. convert and mogrify are great utilities. i do wish there was a nice gui way to set up batches, though...

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Graphics advice for a new MacBook Pro user

Post by Azhrei »

It looks like the binaries for Mac OSX on that page are pretty old -- the most recent is v6.1 for OSX 10.3. Checking the IM home page, the latest release is v9.6 (!) for OSX 10.5, but I don't see anything specifically for 10.4 although I didn't look too hard either.

For me it was easier to just do the work on the Linux box. ;)

User avatar
keithcurtis
Giant
Posts: 129
Joined: Fri Mar 02, 2007 3:18 am
Contact:

Re: Graphics advice for a new MacBook Pro user

Post by keithcurtis »

This would be a pretty straightforward problem for Photoshop, on any platform. Does anyone know if the GIMP has similar slicing ability?

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Graphics advice for a new MacBook Pro user

Post by Azhrei »

But again, those programs are interactive. Someone has to be there to start up the application and select the function/macro/whatever to start the process. IM can do the whole thing from the command line, meaning that it could be launched without any user interaction at all.

But to answer the direct question (!), yes, GIMP has the Script-Fu stuff for automation. Written using Scheme, IIRC, but I think some operations can be "outsourced" to a normal shell.

User avatar
keithcurtis
Giant
Posts: 129
Joined: Fri Mar 02, 2007 3:18 am
Contact:

Re: Graphics advice for a new MacBook Pro user

Post by keithcurtis »

Azhrei wrote:But again, those programs are interactive. Someone has to be there to start up the application and select the function/macro/whatever to start the process. IM can do the whole thing from the command line, meaning that it could be launched without any user interaction at all.
You could save the whole thing as an automated droplet. Drag the file over the app, and hey presto!

Post Reply

Return to “TokenTool”