Expand description
Rotating, flipping and cropping an item’s original file, following Eagle’s viewer.
Eagle rewrites the original in place and keeps its name. A JPEG is turned losslessly by changing its EXIF orientation; PNG, WebP and BMP are drawn rotated and encoded again. Cropping re-encodes PNG, JPEG and WebP. After either, the item is refreshed like “Refresh Thumbnail”: size and file times are read again, width and height measured, the thumbnail redrawn and the palette recomputed.
Undo can’t bring back overwritten pixels, so these edits mark the open undo transaction irreversible (as a permanent delete does). Eagle has no undo for them either.
Structs§
- Pixel
Rect - A rectangle in the original image’s displayed pixels (EXIF orientation applied), as Eagle’s crop tool measures it.
Enums§
- Flip
- A mirror direction for
Library::flip_item.
Functions§
- can_
crop - Formats Eagle’s crop tool works on.
- can_
flip - Formats Eagle’s flip button writes to disk (AVIF is accepted by Eagle but fails when written, and falcon can’t encode it).
- can_
rotate - Formats Eagle’s rotate button works on.
- flip_
orientation - The orientation after mirroring an image shown with orientation
o. A horizontal mirror of a turned image is the mirrored image turned the other way; a vertical mirror is a horizontal one plus a half turn. - is_
animated - An animated PNG (an
acTLchunk) or WebP (anANIMchunk). - jpeg_
orientation - A JPEG’s EXIF orientation: 1 when it has none,
Noneif it isn’t a JPEG. - set_
jpeg_ orientation - Returns
datawith its EXIF orientation set too; the image data is copied unchanged. An existing tag is overwritten in place. If the EXIF block has no orientation, a copy of IFD0 with the tag added is appended to the block and the header pointed at it (offsets elsewhere stay valid). A JPEG with no EXIF gets a minimal block after its JFIF header. - turn_
orientation - The orientation after turning an image shown with orientation
obyturnsmore clockwise quarter turns.