Image Resizing Macro

Thanks for the explanation. I redownloaded the macro, but all that happens is that my image runs through imageoptim but the size remains the same (ie more than 580px). I’ll record a screencast if that helps?

Ah, you are back and didn’t throw in the towel prematurely. Fine! :wink:

I'll record a screencast if that helps?

Why not.

all that happens is that my image runs through imageoptim but the size remains the same (ie more than 580px).

  1. Just to be sure: The size remains exactly the same, or it is not the same but still more than 580px (height)?
  2. Are you still getting the “cannot get source” error?
  3. I noticed that in your penultimate post you said you want to convert to “580px wide”. Was that a typo? (Until then we’ve been speaking of the height, and the macro is set to fit the image to a height of 580px.)
  4. Could you please try to run the macro on the attached image and report back?

288ppi.png.zip (3.6 KB)

Hi Tom

Please watch this:

I show the image dimensions at the start, then run the macro by pressing Command + 2 (this isn’t shown in the screencast). Nothing happens, Then I open KWM to show that the macro is running, then run the macro again. This time the ImageOptim part of the macro runs correctly. I open up the image info to show the size, but it’s not shown, so finally I open it in Photoshop to show that the image size hasn’t been converted to 580px WIDE.

Any ideas what’s going wrong?

The video doesn’t play for me. Maybe it’s still uploading, I’ll check back later.

In the meantime, please —if you find the time— could you try to answer the four questions from my last post?

Thanks.

Just to be sure: The size remains exactly the same, or it is not the same but still more than 580px (height)?

I mean, the size of the image remains unaltered after running the macro.

Are you still getting the “cannot get source” error?

nope

I noticed that in your penultimate post you said you want to convert to “580px wide”. Was that a typo? (Until then we’ve been speaking of the height, and the macro is set to fit the image to a height of 580px.)

sorry yes, typo.

Could you please try to run the macro on the attached image and report back?

still doesn't alter the size

Here’s the video again:

According to your video the original dimensions are 6016×4016 (a bit hard to read) and at the end (in Photoshop) they are 1738×1160.

So, unless I’m missing something, the dimensions are not unaltered. Since 1160 = 2×580 it points to the ppi problem, as discussed in earlier posts.

However, this problem should be solved by the If…Then action in the macro. I have no clue why it isn’t.

Well, we can do two things:

  1. Can you post a link to the unaltered original image?
  2. Below you find a debugging version of the macro. It will output size and ppi information from three different stages of the macro, like this:

Can you run the debugging macro on two or three images, where at least one of them has a resolution higher than 72ppi?

For each image: Write down the Original values (size & ppi) according to Photoshop. Run the debug macro and copy the results from the debug messages. Write down the Final values (size & ppi) according to Photoshop.

Post the results.

Resize Image (Debug).kmmacros (12.6 KB)

BTW, it’s a good idea to change the hotkey of the macro, since ⌘2 is also used in the Finder for the list view.

I am trying to use this Macro to simply

Resize images in finder to be
600 x 600

I removed the part of opening the image in ImageOptim but I cannot seem to get the image to resize and save a new file

Am I making this overly complicated?

Hey Brian,

Probably.

Keyboard Maestro isn't always easy to figure out without some help.

This macro works on the selection in the Finder.

Currently it works with JPEG images, but you can change that in the relevant actions.

-Chris


Resize JPEG Images.kmmacros (5.3 KB)

2 Likes

You rock thank you!!!

So I am selecting the JPEG in finder but nothing is happening, I moved the shortcut to the finder group I have as well.

Do i select the image in finder and hold the shortcut, i tried remapping the shortcut but something seems to happen, i also confirmed its a JPEG.

Hey Brian,

Did you enable the macro? All macros are imported disabled.

Right. One or more images.

You have to give it a few seconds.

Try adding a beep action to the end of the macro, so you can make sure it's working.

-Chris

The marco is enabled and I made sure all the actions were as well, oddly enough it was enabled when Imported it.

I did add the beep which does ring but the file does not change.

Hey Brian,

Hmm... I'm guessing this is a dpi issue. You're on a retina Mac – yes?

My Mid-2010 17" MacBook Pro is high-rez but not retina, and I think that might be the crux of the issue.

I'll look into it some more.

-Chris

i am on a MBP, let me try it on my Mac pro which is where I'll mainly be using this.

Still does not seem to be working, the image disappears for a bit from the desktop than comes back the original size.

Hey Brian,

Try this and see if anything is different.

Resize JPEG Images v1.01.kmmacros (5.7 KB)

-Chris

1 Like

Chris I really appreciate your help, this still seems to have the same issue the image will vanish and come back but not resized, I am using a 3 monitor set up if you think that is the issue, I've tried running its off the desktop itself and in a finder window.

Hooooooly crap! Sorry for my French. Once again, Monsieur Stone knocks it out of the park. Thank you! I'm sure there are LOTS of things that I don't know, but this one has blown my mind for the moment!

I can resize a photo "underground" without opening Photoshop!?! :exploding_head: I can't wait to discover other types of things that can be done like that, in the background.

One question though, is there a way to set a max width and let the height scale proportionally? So if it's a square, no problem, but if it's a horizontal rectangle...

If not, I need to just create multiple versions of this macro with different sizes: square, horizontal, vertical...? I think that's what the OP was originally looking for but it doesn't look like we ever got there.

1 Like

Yes, there is. Just change the number in the orange action to the desired max width:

Resize Images with Predefined Max Width.kmmacros (11.6 KB)

If you want the resized images to replace the originals, just remove the _Resized suffix in the Write File actions.

1 Like