Jump to content
You must now use your email address to sign in [click for more info] ×

How to avoid double extentions when bulk exporting images


Recommended Posts

I have to crop a bunch of images to a specific size for a website I'm working on, and I'm using the method of bringing everything into affinity photo through a stack, and it works well. The issue arises when I'm exporting. The layers always have the file extension in them, so when I export the images it ends up being {filename}.jpg.jpg. 

This doesn't break the file, but it's far from a best practice and I don't know what would happen if I tried to export it as something other than the same file type as the original, so I was wondering if there is a way for me to avoid this from happening

Link to comment
Share on other sites

It's clumsy, but perhaps you could edit the layer names before you do the Export operation?

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

I think it's easiest to let Photo do its stuff and clean up afterwards
The attached Powershell script renames as follows:

Originals
123.jpg.png
PlaceURL.jpeg.png
sample.jxl.png
SigFigs.tiff.png
SigFigs2.svg.png
SigFigs2.tif.png
ToneMap.jpg.png

Processed
123.png
PlaceURL.png
sample.png
SigFigs.png
SigFigs2.png
SigFigs2.tif.png
ToneMap.png

There may be a problem running this as it's from the internet and unsigned, if so I would open it in a text editor, copy contents to a new document and save as a ps1 file from there

DelDupExtns.ps1

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

If you don't want to modify the initial file names isn't it possible to "Save" the cropped images – instead of "Export"?
(which would overwrite the initial files / may require copies for the bulk cropping)

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.