0

I have a set of 1000 maps with differing height/width ratio which I export to a fixed frames of 16000x11000 pixels.

As a result, the new images have stripes of differing width at the top and the bottom. I can color those strips any way I want.

What I need is to resize the image so that the stripes are removed.

From:

original

To:

result

I can do it one by one by hand, but that's a long process, and if done precise to the pixel even longer, so I thought that might be automated somehow.

  • 1
    Have you tried the trim command? – joojaa Nov 11 at 16:59
0

The Trim command is what you want to use.

  1. Click Image->Trim...
  2. Choose "Top Left Pixel Color" and hit OK

enter image description here

This could easily be recorded as an action and run on a folder full of images in Bridge.

| improve this answer | |
  • tried that - no visible effect? I checked the top left pixel and reduced the color to an index so that this can't interfer. Still, no effect. – Wernazuma Nov 12 at 8:26
  • I have CS6, FYI – Wernazuma Nov 12 at 8:38
  • Is Trim limited to some specs maybe? But even with that, I only succeeded once. I can do it with images I create in photoshop, but not with the images I have. – Wernazuma Nov 12 at 13:36
  • @Wernazuma - the problem is the corner pixels in your example image are white, and the blue is not a single solid colour. To be honest, you'd probably need to do more manual work to fix your image to be able to use the Trim function than it would take to manually crop the images. Manually cropping hundreds of images is painful in Photoshop, but much quicker and easier in Adobe Lightroom Classic. – Billy Kerr Nov 12 at 15:05
  • I saw that the corner pixel os white, but assumed that was an artifact from screen-shotting... @Wernazuma can you give us a link to an actual file to inspect? – Circle B Nov 12 at 17:16
0

You created these images from the maps with resolution of 16000x11000 pixels. This created the blue color stripes because of their different aspect ratio. This means you created the problem. :)

What you have to do is use an image resizing tool and just tell it to resize the maps to that resolution without taking in consideration the aspect ratio. I don't know if we can recommend software here but I use FastStone Photo Resizer. It can do a lot of stuff like resizing, rotating, cropping etc. Just import all the maps and resize them to your desired size but they will be a bit stretched. If you do care about the aspect ratio, then I would write a PHP script, where I have 1 empty grayish noisy background (as in your maps), then make PHP paste the maps in the middle and output a new file. It might not be what you expected but you can write this script and run it on your computer using WAMP. Trust me, it's worth it for 1000 maps. It's a few lines of code that can make this happen.

| improve this answer | |
  • Thanks for the offer! Though I fear I can't go that path. The problem is: I load the original maps into a GIS, georeference and export it from there. That means, the output image is created in the GIS software with a projection, so it isn't the original image. And I can't find a way to make the GIS export the maps maintaining their aspect ratio, especially since the export is done in an automatted way. That's why they all are in the same resolution and I created the blue color stripes to clearly define the added parts. – Wernazuma Nov 16 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.