| #
65ba535c
|
| 08-Jul-2026 |
Andreas Gohr <gohr@cosmocode.de> |
fix(media): suppress exif_read_data() warnings on malformed JPEGs
Reading the EXIF orientation of a JPEG called exif_read_data() without error suppression, so a file with a broken EXIF block emitted
fix(media): suppress exif_read_data() warnings on malformed JPEGs
Reading the EXIF orientation of a JPEG called exif_read_data() without error suppression, so a file with a broken EXIF block emitted a warning that the error handler logged on every media manager, detail page and media diff render.
Bump slika to 1.2.1, which suppresses the warning at the source.
show more ...
|
| #
c3a14f67
|
| 06-Jul-2026 |
Andreas Gohr <gohr@cosmocode.de> |
fix(media): don't upscale small images in the detail previews
The detail page, media manager and media diff requested a bounding-box resize at the full box size, so an image smaller than the box was
fix(media): don't upscale small images in the detail previews
The detail page, media manager and media diff requested a bounding-box resize at the full box size, so an image smaller than the box was enlarged and fetch.php generated and cached the upscaled copy.
slika 1.2 adds an $upscale option to resize/crop. getDisplayDimensions() now takes a $fit flag mirroring fetch.php one to one and predicts the matching no-upscale dimensions, media_resize_image()/media_mod_image() forward $upscale, and fetch.php disables upscaling for fit=1 requests. In-page image scaling is unchanged.
show more ...
|
| #
dd9e8e5e
|
| 23-Apr-2026 |
Andreas Gohr <andi@splitbrain.org> |
fix EXIF-rotated images shown cropped in previews, closes #4482
JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in the mediamanager detail view, the image diff view and the fullscreen deta
fix EXIF-rotated images shown cropped in previews, closes #4482
JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in the mediamanager detail view, the image diff view and the fullscreen detail page: getimagesize() / JpegMeta report raw (rotation-unaware) pixel dimensions, and passing both w and h to fetch.php defaults to center-crop.
- Bump splitbrain/slika to 1.1, which ships ImageInfo: a rotation- aware, metadata-only dimension simulator mirroring Adapter's fluent API (autorotate/resize/crop). - Add fit=1 to fetch.php: when both w and h are given, route to media_resize_image() (bbox fit) instead of media_crop_image(). Token hashes only (id, w, h) so existing tokens stay valid. - Add MediaFile::getDisplayDimensions($w, $h, $crop) which delegates to ImageInfo and returns the dims fetch.php would produce. - Add Display::getDetailHtml() and retire media_preview() / the old media_image_preview_size() helper. media_tab_view and MediaDiff now share the Display-based renderer. - Rewrite tpl_img() (lib/tpl/*/detail.php) to use MediaFile dims + fit=1 URL; drops the manual ratio math. - Tests: MediaFileTest covers the dims math, DisplayTest covers the detail-view HTML (rotated dims, rev-vs-timestamp URL selection, structure), fetch_imagetoken gains a fit-token compat test. Fixture _test/data/media/wiki/exif-orient-6.jpg: 20x30 JPEG with EXIF orientation 6.
show more ...
|