Jump to content

Recommended Posts

Posted

Hi,

I'm currently working on a Publisher document that contains approximately 40 images that are flagged by Preflight with "Placed image DPI too low".  I know how to use Photo to upsample the images, but I'm wondering if there's some way to use the Photo "batch job" feature to specify a common "destination" dpi, such as 300 dpi and convert an entire specified set of images automatically.  This would be really convenient, but it doesn't appear that such a feature exists.  Is this the case?

Thanks,

Ken

 

Posted

You can use a simple macro to change the resolution to 300DPI and attach that to the batch job

There still may be a bug whereby recording such a macro in the current versions of APhoto does not work. But an older version of that macro has been uploaded several times to this forum so you should be able to find it

 

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Posted

 

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted
17 hours ago, walt.farrell said:

 

Hi Walt,

Thanks for this, but I have a feeling that they aren't going to work in my case.  When I place images into my Publisher document, I often resize them in Publisher, which causes their pixel density to change.  I can see how macros can work completely in Photo, but I can't see how the macros would be able to "know" what the size of the images are in my Publisher document, which I believe is necessary to perform the calculations needed to arrive at a particular dpi value within the Publisher document.  Or is there a way that this can be done.

Ken

Posted

I think you'd need some fairly fancy scripting to achieve what you're looking for, and unfortunately neither Photo nor Publisher support scripting, plain or fancy.

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Posted
6 hours ago, Ken Hjulstrom said:

Thanks for this, but I have a feeling that they aren't going to work in my case.  When I place images into my Publisher document, I often resize them in Publisher, which causes their pixel density to change.  I can see how macros can work completely in Photo, but I can't see how the macros would be able to "know" what the size of the images are in my Publisher document, which I believe is necessary to perform the calculations needed to arrive at a particular dpi value within the Publisher document.  Or is there a way that this can be done.

I think you would need to convert the images using a batch job in the Photo application, to the size/DPI you need for use in Publisher.

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted
47 minutes ago, ,,, said:

 

These macros specifically do not resample, therefore the Publisher preflight 'error' flag would remain.

That should only be a problem if the images are being enlarged as they are Placed into the Publisher document. 

In that case, just change the DPI of the images so it is larger than the required amount, do it is still large enough when you enlarge the image while Placing it. 

Or, as I suggested, use the batch job to resize the image to the size you need, and the DPI you need.

 

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted
14 minutes ago, walt.farrell said:

In that case, just change the DPI of the images so it is larger than the required amount, do it is still large enough when you enlarge the image while Placing it. 

Or, as I suggested, use the batch job to resize the image to the size you need, and the DPI you need.

Yes, you made that suggestion, but I was responding to your other post (explicitly quoted in my message) which linked to macros which would be of no use for the problem at hand.

Posted
17 minutes ago, ,,, said:

Yes, you made that suggestion, but I was responding to your other post (explicitly quoted in my message) which linked to macros which would be of no use for the problem at hand.

My suggestion was to use them in a batch job to both resize and change the DPI. The batch job would handle the resizing, and the macro would handle changing the DPI. But I haven't tried that, so if you have and it doesn't work, sorry.

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted
22 minutes ago, walt.farrell said:

My suggestion was to use them in a batch job to both resize and change the DPI. The batch job would handle the resizing, and the macro would handle changing the DPI. But I haven't tried that, so if you have and it doesn't work, sorry.

The only thing that would need to be done by the batch job is resizing (as in resampling to change the pixel count) the source images. The inherent ppi of a placed image is irrelevant. The relevant thing is the density of its pixels at its current size in the document.

Posted
12 minutes ago, ,,, said:

The only thing that would need to be done by the batch job is resizing (as in resampling to change the pixel count) the source images. The inherent ppi of a placed image is irrelevant. The relevant thing is the density of its pixels at its current size in the document.

But the only thing a batch job can do (without using macros) is change the dimensions while keeping the pixel count the same, as far as I know. That will now work for the OP's purposes. The macro is needed to adjust the DPI, which is what Preflight is complaining about. Yes?

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted (edited)
4 hours ago, walt.farrell said:

But the only thing a batch job can do (without using macros) is change the dimensions while keeping the pixel count the same, as far as I know. That will now work for the OP's purposes. The macro is needed to adjust the DPI, which is what Preflight is complaining about. Yes?

Preflight has no interest in the inherent ppi of a placed image. It reports a problem when there are fewer than a threshold quantity (default is 72) of the image object's contained pixels per inch of the document.

Edited by ,,,
edited threshold ppi comment
Posted
5 minutes ago, ,,, said:

Preflight has no interest in the inherent ppi of a placed image. It reports a problem when there are fewer than 72 of the image object's contained pixels across one inch of the document.

 

Thanks.

After reading that i started laying out the steps to avoid that, and realized that all of them involve resizing and/or resampling. So I think you're saying (which I misunderstood) that those particular macros don't help because they specifically don't resample. So one would need to record a different macro which will resample.

 

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

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted
7 minutes ago, walt.farrell said:

So I think you're saying (which I misunderstood) that those particular macros don't help because they specifically don't resample

Yes, that is exactly what I said to begin with :)

 

Posted
13 minutes ago, walt.farrell said:

 

Thanks.

After reading that i started laying out the steps to avoid that, and realized that all of them involve resizing and/or resampling. So I think you're saying (which I misunderstood) that those particular macros don't help because they specifically don't resample. So one would need to record a different macro which will resample.

 

If you don't mind losing the colour profiles that may be embedded in the placed images, you could simply select all images and do Rasterise to get the images resampled to Pixel objects at the document ppi, but there is no way to choose which resampling algorithm is used by the Rasterise command.

Posted
2 hours ago, walt.farrell said:

That should only be a problem if the images are being enlarged as they are Placed into the Publisher document. 

In that case, just change the DPI of the images so it is larger than the required amount, do it is still large enough when you enlarge the image while Placing it. 

Or, as I suggested, use the batch job to resize the image to the size you need, and the DPI you need.

 

Yes, changing the DPI of the images so it's larger than the required amount would in fact work, but it will probably result in most of the images having an effective DPI that's very much in excess of the 300 DPI that my document will be generated with.  In my case, there are two issues that make the pixel resolution a bit more difficult than for some other document creators:

  1. The images that are presented to me are created from many different sources, and from different contributors.  Some images arrive to me at 300 - 400 DPI (photos from original sources), and others may be as low as 75 - 100 DPI (images downloaded from websites), so I'm not starting with images that have a consistent pixel density
  2. In order to achieve pleasing page layouts, I'll often resize images to either make a set of images all the same size, or to control the amount of space on a page that's available for the accompanying text.  If there's a bit of empty space at the end of an article's text, I can usually fill this by enlarging of of the accompanying images slightly.

The only reliable way to set the DPI of all images used in my document high enough so Preflight won't issue low-DPI warnings would be to set the pixel density of all images high enough so the density would be 300 DPI if the image were a full-page in size.

Ken

 

Posted
2 hours ago, ,,, said:

The preflight 'error' flag appears when an Image or Pixel object has a pixel density of less than 72 ppi at its current size in the document, so it is almost certain that the OP is enlarging the placed Images.

I believe that the Preflight "error" regarding low DPI isn't hardcoded to 72 DPI, but instead seems to be triggered if an image DPI is less than the DPI that's specified in the "DPI" value in the "Document" tab of the "Document Setup" window.  I have my document DPI set to 300 DPI, and Preflight is showing "low DPI" errors for every image that has an effective DPI of less than 300.

Ken

 

Posted

FYI, here's how I initially lay out my document and manage the Preflight DPI errors in the documents I create.  As I stated in another reply here, I'm assembling a magazine that contains a series of articles, written by different authors.  Most articles contain images that are submitted to me having widely differing pixel densities and intial dimensions:

  1. I arrange the document elements (article text and accompanying images) so as to produce a pleasing layout and also to fill each page.  I usually resize images in order to adjust the flow of the accompanying text so the text nicely fills the space not used by the images.
  2. When I'm done with the layout, I check Preflight to see if there are any DPI errors.  There are usually quite a few (for the document I'm working on now, I have 69 "Placed image DPI too low" errors).
  3. If I have DPI errors, I open the Resource Manager window and sort the list of images by DPI, from low to high.
  4. One-by-one, I open the images with a too-low DPI in Photo, go to Document | Resize Document, make sure that the horizontal and vertical dimensions are linked to each other and that "Resample" is checked, and in either of the "Size" values, after the numeric pixel size, I append "*[desired DPI]/[current DPI], and then click "Resize".  For example, one of my images in Publisher has a DPI of 80, and Preflight is flagging it.  When I open the image in Photo, and select "Resize Document", I see that its dimensions are "261 px" and "296 px".  I change the "261 px" to "261*(300/80) px", and hit "Enter", which changes the image's pixel dimensions to "987.8 px" and "1110 px".
  5. I then click "Resize" and then export the resized image over the original lower-resolution version.
  6. I then check that image's status in the Resource Manager, and see that its status is "Modified".  I select that image in the Resource Manager and click the "Update" button at the bottom of the Resource Manager window.  After the update, that same image now reports a DPI of 301, and its associated Preflight error has disappeared.

This works well for me, though it is a bit tedious.  For a document requirement of 300 DPI, I usually use "325" instead of "300" when doing the image resizing, to allow for a bit of "wiggle room" should I need to adjust the image size in Publisher, and also to avoid negative round-offs during the document resizing process (using "300", I sometimes end up with Preflight errors reporting that the image I just resized is being flagged as having a "too-low" value of 299 DPI).

It would seem to me that the only approach to automate what I'm doing manually would be if a script or macro could be run from Publisher, possibly using the Photo persona interface to do the resizing.  What would be ideal would be if the other image resizing parameters could be specified in a profile, which would allow for the user to specify a default resampling method and destination for the resized file.  If this were supported, then it should be possible to offer a "Fix" button to the right of each of the "low DPI" Preflight errors, which would make fixing these very efficient!

Ken

Posted
1 hour ago, Ken Hjulstrom said:

I believe that the Preflight "error" regarding low DPI isn't hardcoded to 72 DPI, but instead seems to be triggered if an image DPI is less than the DPI that's specified in the "DPI" value in the "Document" tab of the "Document Setup" window.  I have my document DPI set to 300 DPI, and Preflight is showing "low DPI" errors for every image that has an effective DPI of less than 300.

Ken

 

For me using APub 2 beta 2.1.0.1713 on macOS, the error threshold seems to be hardcoded at 72 ppi. For example, when my document is 300 ppi, the preflight error is flagged only when an Image or Pixel object is at a size where its placed ppi is below 72. I can scale an Image or Pixel object up and down with the error being flagged or disappearing each time the object crosses the 72 ppi threshold.

Addition: Same 72 ppi threshold in APub 2.0.4 and 1.10.6

Posted
59 minutes ago, ,,, said:

For me using APub 2 beta 2.1.0.1713 on macOS, the error threshold seems to be hardcoded at 72 ppi. For example, when my document is 300 ppi, the preflight error is flagged only when an Image or Pixel object is at a size where its placed ppi is below 72. I can scale an Image or Pixel object up and down with the error being flagged or disappearing each time the object crosses the 72 ppi threshold.

Addition: Same 72 ppi threshold in APub 2.0.4 and 1.10.6

I see what's happening here.  You're probably correct regarding the 72 dpi threshold, but that's probably the default value.  Preflight allows you to create custom profiles (click on the three horizontal lines to the right of the profile name), and you can customize the settings.  I just noticed that I'm using a custom profile, and it appears that in the past, I've tweaked the DPI threshold for generating a Preflight error to be 300 DPI (see attached).

Ken

Screenshot 2023-03-04 at 1.44.51 PM.png

Posted (edited)
1 hour ago, Ken Hjulstrom said:

I see what's happening here.  You're probably correct regarding the 72 dpi threshold, but that's probably the default value.  Preflight allows you to create custom profiles (click on the three horizontal lines to the right of the profile name), and you can customize the settings.  I just noticed that I'm using a custom profile, and it appears that in the past, I've tweaked the DPI threshold for generating a Preflight error to be 300 DPI (see attached).

Ken

Screenshot 2023-03-04 at 1.44.51 PM.png

 

Yes, I discovered the custom profiles thing only a moment before you posted it :)

 

Addition: I have now edited an earlier comment regarding the threshold ppi.

Edited by ,,,
Posted
6 hours ago, lacerto said:

IMO autoupsampling should never happen. I can understand if it happens in software targeted for hobbyists and semiprofessionals but this should still behave consistently and there should be an option to turn off auto-upsampling (whether by default the kind of option being turned on or off).

Thanks, @lacerto. Great catch! It's strange how different PDF presets treated the same file differently.

I agree, automatic up sampling should never happen by default in a professional page layout program. If someone wants auto upsizing behavior, they should have the "option" to turn it ON during export. Default should be NO upsizing. That's what preflight warnings are presumably for.

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet

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.