Crop and Normalize Images
Turns a photo upright and standardizes it to one format before it is placed in a form's image slot; photos recovered from a property listing also lose a fixed strip off the bottom.
Overview
Photographs arrive in whatever state the person who took them left them in. Twelve shots from an inspector's phone, three from a drone, two scanned from a printed report — portrait and landscape, eight megapixels and eighty kilobytes. Some are sideways, because the camera recorded its orientation as metadata that the receiving program ignored.
Two things get fixed before a photo reaches the page. The recorded orientation is applied to the pixels, so a sideways phone photo is upright by the time it lands — and stays upright in whatever opens the finished PDF, because the orientation tag is not carried through. And every image, whatever it arrived as, is re-encoded to one format, so a camera photo, a screenshot, a greyscale scan and an indexed-colour graphic all reach the page as the same kind of thing. That consistency is most of the difference between a photo page that looks deliberate and one that looks like an accident.
What does not happen is resizing. A photo is fitted inside its slot at whatever pixel dimensions it arrived with; the slot controls how large it looks on the page, not how much of the file it occupies. Ten megapixels per photo is ten megapixels per photo in the finished package, which makes the size of what you upload the main thing that decides the size of what you get back.
What It Does
| Capability | What it means for you |
|---|---|
| Recorded orientation applied | A photo the camera recorded as sideways is turned upright, and the rotation is baked into the pixels — it will not come back sideways in a different viewer |
| One output format | Camera photos, screenshots, greyscale scans and indexed-colour graphics all become the same format before placement, so the PDF handles them identically |
| Fitted, not stretched | An image is scaled to fit inside its slot with its proportions kept, so a shape mismatch produces margins rather than a squashed subject — unless the slot itself is set to fill |
| Bottom strip trimmed off recovered listing photos | Photos pulled out of a property-listing PDF lose a fixed slice off the bottom edge, so a watermark sitting in that strip goes with it — along with anything else that was there |
When This Runs
Nothing chooses this. It is applied automatically, in two places, and there is no option to skip or change it — the step takes an image and nothing else.
Every image assigned to a slot goes through it during final assembly: after the sections are merged, immediately before the picture is drawn onto the page by Place an Image in a Slot. Separately, when a property-listing PDF is uploaded and taken apart into individual photo attachments, each recovered photo has its bottom strip trimmed at that point.
Nothing about the picture changes what happens to it. The same rotation and re-encoding is applied to every image on the way into the page.
Inputs and Outputs
Takes: an image. Nothing else — not the slot's dimensions, not a target size, not a region.
Returns: the same picture, upright and in a single format, at the pixel dimensions it came in at. On the listing-photo path it also comes back shorter by the trimmed strip.
The stored upload is not modified. The placed copy is produced during assembly and exists only inside the finished package, so re-running assembly starts from the file you uploaded rather than from a processed version of it.
Example
An inspector uploads fourteen phone photos, three of them taken with the phone turned sideways, and they get assigned to the report's photo slots.
At assembly each photo is turned upright where its camera recorded a rotation, re-encoded to one format, and drawn inside its slot with its proportions kept. A portrait photo in a landscape slot gets margins either side — it is not cropped to fill the space, and nothing looks at the picture to decide. The three sideways shots come out upright, and stay upright in any viewer.
Each photo is embedded at the resolution it was uploaded at. Fourteen ten-megapixel photos therefore make a large finished package, and the way to make it smaller is to upload smaller photos.
Limits
- Nothing is resized. A ten-megapixel photo is embedded at ten megapixels even in a slot two inches wide. Package size follows the resolution of what you upload, not the size of the slot.
- Nothing is cropped to fit a slot. An image whose proportions differ from the slot's gets margins, not a trim. There is no crop-to-fill, no centre crop, and no way to single out a region of an image.
- Transparency is lost. An image with transparent areas is flattened before placement, and those areas come back as whatever colour was stored underneath them — often black.
- Colours are converted. Greyscale, indexed-colour and print-colour originals are converted to screen colour, which can shift them.
- It is not photo retouching. Exposure, focus, sharpness and motion blur are untouched, and no detail can be recovered that the camera did not capture. A photo that needs retaking needs retaking.
- An image that cannot be opened is skipped quietly. Its slot ships empty in the finished package rather than the run failing, and if the whole placement pass fails, no images are placed at all.
- The bottom trim is fixed, not adaptive. It removes the same proportion of every recovered listing photo whether or not there is anything there to remove, it does nothing about a logo anywhere else in the frame, and running it twice trims twice.
- A bad scan stays bad. An image already cut off at the edge or skewed on the platen cannot be repaired by trimming it further.
FAQ
Why do my photos come out sideways in the finished PDF?
Because phones usually store the picture in one orientation and record how it should be turned as separate metadata. Programs that ignore that metadata display the image sideways. Here the rotation is applied to the pixels before placement and the orientation tag is not carried into the output, so the picture is upright in whatever opens the finished PDF.
Will cropping distort my photos?
No. An image is scaled to fit inside its slot with its proportions kept, so a photo whose shape differs from the slot's gets margins rather than being squeezed. Whether a slot fits or fills is a property of the slot, and fitting is what a slot does unless it says otherwise.
How large should photos be for a form?
Only as large as the printed slot needs, because nothing is downscaled on the way in. A photo occupying a third of a page at print quality needs a fraction of a modern phone camera's resolution, and anything beyond that adds file size to the finished package without adding anything visible on the page.
Can it crop a specific part of an image?
No. There is no way to nominate a region. The only crop applied to a photo is a fixed slice off the bottom of photos recovered from a property-listing PDF, and it is the same slice every time.
What happens when a portrait photo goes into a landscape slot?
It is fitted inside the slot and gets margins either side. It is not cropped to fill the slot, and nothing inspects the picture to decide — the same fitting is applied to every image.
Does it improve photo quality?
No. It applies the recorded rotation and re-encodes the picture. It does not sharpen, brighten or correct colour, and it cannot recover detail a camera did not capture. Converting a print-colour original to screen colour can shift it. A photo that needs retaking needs retaking.