Lychee icon indicating copy to clipboard operation
Lychee copied to clipboard

Add (optional) lossless rotation

Open d7415 opened this issue 6 years ago • 9 comments

ImageMagick (and GD) rotation involves recompressing images. Lossless rotation is available from some external tools such as exiftran and jpegtran. This could be included as an option, like useExifTool in Lychee v3.

d7415 avatar Mar 07 '19 20:03 d7415

(As discussed in #111)

d7415 avatar Mar 07 '19 20:03 d7415

isn't this now integrated or not ? I don't remember the status on that one. @d7415 @tmp-hallenser @kamil4 ?

ildyria avatar Aug 18 '20 22:08 ildyria

Lychee 5.5.1 still seems to recompress photos in portrait mode. I uploaded a 11.8 MB 4000x6000 photo from my camera's SD card and when I download the "original" from Lychee, I am presented with a 5.6M photo in the same resolution.

This issue should get high - if not highest - priority, because users might trust Lychee that it stores the untouched originals for them, so they might delete their true original photos from their camera's SD cards. Finding out later that the "originals" Lychee provides are recompressed is an extremely bad surprise to say the least.

Moreover, when I download the recompressed original from Lychee, the EXIF data for my photo is missing.

I will gladly assist you with any additional information you might need, because Lychee is a really nice photo gallery. So if I can be of any help, please hit me up.

schnippl0r avatar Oct 09 '24 16:10 schnippl0r

Could it be that the picture is has to be rotated according to Exif Data ?

ildyria avatar Oct 09 '24 16:10 ildyria

This is the EXIF data from my camera's original:

File Name                       : camera_original.JPG
Directory                       : .
File Size                       : 12 MB
File Modification Date/Time     : 2024:10:09 18:41:54+02:00
File Access Date/Time           : 2024:10:09 18:42:36+02:00
File Inode Change Date/Time     : 2024:10:09 18:44:35+02:00
File Permissions                : -rwxr-xr-x
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : Canon
Camera Model Name               : Canon EOS R6m2
Orientation                     : Rotate 270 CW
X Resolution                    : 350
Y Resolution                    : 350
Resolution Unit                 : inches
Modify Date                     : 2023:11:25 03:37:01
Artist                          :
Y Cb Cr Positioning             : Co-sited
Copyright                       :
Exposure Time                   : 1/2500
F Number                        : 1.8
Exposure Program                : Aperture-priority AE
ISO                             : 5000
Sensitivity Type                : Recommended Exposure Index
Recommended Exposure Index      : 5000
Exif Version                    : 0231
Date/Time Original              : 2023:11:25 03:37:01
Create Date                     : 2023:11:25 03:37:01
Offset Time                     : +02:00
Offset Time Original            : +02:00
Offset Time Digitized           : +02:00
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/2656
Aperture Value                  : 1.8
Flash                           : No Flash
Focal Length                    : 50.0 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : Fine
Canon Flash Mode                : Off
Continuous Drive                : Single
Focus Mode                      : One-shot AF
Record Mode                     : CR3+JPEG
Canon Image Size                : Large
Easy Mode                       : Manual
Digital Zoom                    : None
Contrast                        : Normal
Saturation                      : Normal
Metering Mode                   : Evaluative
Focus Range                     : Auto
Canon Exposure Mode             : Aperture-priority AE
Lens Type                       : Canon RF 50mm F1.2L USM or other Canon RF Lens
Max Focal Length                : 50 mm
Min Focal Length                : 50 mm
Focal Units                     : 1/mm
Max Aperture                    : 1.8
Min Aperture                    : 23
Flash Activity                  : 0
Flash Bits                      : E-TTL
Focus Continuous                : Single
Image Stabilization             : On (2)
Zoom Source Width               : 0
Zoom Target Width               : 0
Manual Flash Output             : n/a
Color Tone                      : Normal
Clarity                         : 0
Focal Type                      : Fixed
Auto ISO                        : 100
Base ISO                        : 4935
Measured EV                     : 7.38
Target Aperture                 : 1.8
Target Exposure Time            : 1/2580
Exposure Compensation           : 0
White Balance                   : Auto
Slow Shutter                    : None
Shot Number In Continuous Burst : 0
Optical Zoom Code               : 0
Camera Temperature              : 29 C
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : Off
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
Measured EV 2                   : 5.5
Bulb Duration                   : 0
Camera Type                     : EOS High-end
Auto Rotate                     : Rotate 270 CW
ND Filter                       : Off
Canon Image Type                : Canon EOS R6m2
Canon Firmware Version          : Firmware Version 1.1.4
Canon Model ID                  : EOS R6 Mark II
Thumbnail Image Valid Area      : 0 159 6 113
AF Area Mode                    : Spot AF
Num AF Points                   : 1053
Valid AF Points                 : 1
Canon Image Width               : 6000
Canon Image Height              : 4000
AF Image Width                  : 6000
AF Image Height                 : 4000
AF Area Widths                  : 216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
AF Points In Focus              : 0
AF Points Selected              : 0
Image Unique ID                 : 64dbbfbddaf94a23b5f36e802afa5d15
Time Zone                       : +02:00
Time Zone City                  : Paris
Daylight Savings                : On
Battery Type                    : LP-E6NH
Bracket Mode                    : Off
Bracket Value                   : 0
Bracket Shot Number             : 0
Raw Jpg Size                    : Large
WB Bracket Mode                 : Off
WB Bracket Value AB             : 0
WB Bracket Value GM             : 0
Live View Shooting              : On
Focus Distance Upper            : 16.39 m
Focus Distance Lower            : 8.26 m
Shutter Mode                    : Electronic
Flash Exposure Lock             : Off
Anti Flicker                    : Off
RF Lens Type                    : Canon RF 50mm F1.8 STM
Internal Serial Number          : MQ0310941
Dust Removal Data               : (Binary data 1024 bytes, use -b option to extract)
Crop Left Margin                : 0
Crop Right Margin               : 0
Crop Top Margin                 : 0
Crop Bottom Margin              : 0
Exposure Level Increments       : 1/3 Stop
ISO Speed Increments            : 1/3 Stop
AEB Auto Cancel                 : On
AEB Sequence                    : 0,-,+
AEB Shot Count                  : 3 shots
Safety Shift                    : Disable
Aperture Range                  : Manual: Closed 64; Open 1; Auto: Closed 18; Open 1.8
Same Exposure For New Aperture  : Disable
AE Lock Meter Mode After Focus  : Evaluative
Dial Direction Tv Av            : Normal
Custom Controls                 : 19 0 19 0 0 0 0 14 3 0 0 0 0 14 18 0 4 0 53 0 25 0 146 0 13 0 14 2 91 2 5 7 29 0 76 0 75 0 75 0 76 0 23 0 0 0 0 0 90 0 29 0 54 0 78 0 88 0 103 0 52 0 105 0 53 0 4186174 0 3 5376 3840 0 0 0 0 0 0 0 0 65535 0 0 5200 0 0 14 0 0 0 0 0 0 65535 0 7 3 4 31 4 2 5 8 0 1 29 0 10 0 47 0
Shutter Release Without Lens    : Disable
Control Ring Rotation           : Normal
Add Aspect Ratio Info           : Off
Default Erase Option            : Cancel selected
Retract Lens On Power Off       : Enable
Add IPTC Information            : Disable
Audio Compression               : Enable
Aspect Ratio                    : 3:2
Cropped Image Width             : 6000
Cropped Image Height            : 4000
Cropped Image Left              : 0
Cropped Image Top               : 0
Tone Curve                      : Standard
Sharpness                       : 4
Sharpness Frequency             : n/a
Sensor Red Level                : 0
Sensor Blue Level               : 0
White Balance Red               : 0
White Balance Blue              : 0
Color Temperature               : 5200
Picture Style                   : Auto
Digital Gain                    : 0
WB Shift AB                     : 0
WB Shift GM                     : 0
Unsharp Mask Fineness           : 2
Unsharp Mask Threshold          : 3
Measured RGGB                   : 773 1024 1024 432
VRD Offset                      : 0
Sensor Width                    : 6188
Sensor Height                   : 4120
Sensor Left Border              : 168
Sensor Top Border               : 108
Sensor Right Border             : 6167
Sensor Bottom Border            : 4107
Black Mask Left Border          : 0
Black Mask Top Border           : 0
Black Mask Right Border         : 0
Black Mask Bottom Border        : 0
Color Data Version              : 48 (R7, R10, R6 Mark II)
WB RGGB Levels As Shot          : 1846 1024 1024 1719
Color Temp As Shot              : 4503
WB RGGB Levels Auto             : 1846 1024 1024 1719
Color Temp Auto                 : 4503
WB RGGB Levels Measured         : 1846 1024 1024 1719
Color Temp Measured             : 4503
WB RGGB Levels Daylight         : 1975 1024 1024 1509
Color Temp Daylight             : 5200
WB RGGB Levels Shade            : 2289 1024 1024 1303
Color Temp Shade                : 7000
WB RGGB Levels Cloudy           : 2131 1024 1024 1404
Color Temp Cloudy               : 6000
WB RGGB Levels Tungsten         : 1374 1024 1024 2212
Color Temp Tungsten             : 3200
WB RGGB Levels Fluorescent      : 1691 1024 1024 2110
Color Temp Fluorescent          : 3683
WB RGGB Levels Kelvin           : 1975 1024 1024 1509
Color Temp Kelvin               : 5200
WB RGGB Levels Flash            : 2175 1024 1024 1378
Color Temp Flash                : 6267
Per Channel Black Level         : 2048 2048 2048 2048
Normal White Level              : 13535
Specular White Level            : 14888
Linearity Upper Margin          : 12735
Picture Style User Def          : Auto; Auto; Auto
Picture Style PC                : None; None; None
Custom Picture Style File Name  :
AF Micro Adj Mode               : Disable
AF Micro Adj Value              : 0
Vignetting Corr Version         : 0
Peripheral Lighting             : On
Distortion Correction           : On
Chromatic Aberration Corr       : On
Peripheral Lighting Value       : 1
Distortion Correction Value     : 0
Original Image Width            : 100
Original Image Height           : 100
Peripheral Lighting Setting     : On
Chromatic Aberration Setting    : On
Distortion Correction Setting   : On
Digital Lens Optimizer Setting  : On
Peripheral Illumination Corr    : Off
Auto Lighting Optimizer         : Standard
Highlight Tone Priority         : Off
Long Exposure Noise Reduction   : Off
High ISO Noise Reduction        : Off
Digital Lens Optimizer          : Standard
Dual Pixel Raw                  : Off
Ambience Selection              : Standard
Multi Exposure                  : Off
Multi Exposure Control          : Additive
Multi Exposure Shots            : 0
Grainy B/W Filter               : Off
Soft Focus Filter               : Off
Toy Camera Filter               : Off
Miniature Filter                : Off
Miniature Filter Orientation    : Horizontal
Miniature Filter Position       : 0
Miniature Filter Parameter      : 0
Fisheye Filter                  : Off
Painting Filter                 : Off
Watercolor Filter               : Off
HDR                             : Off
HDR Effect                      : Natural
AF Config Tool                  : Case 11
AF Tracking Sensitivity         : 127
AF Accel/Decel Tracking         : 127
AF Point Switching              : -1
AI Servo First Image            : Equal Priority
AI Servo Second Image           : Equal Priority
USM Lens Electronic MF          : One-Shot -> Enabled (magnify)
AF Assist Beam                  : Disable
One Shot AF Release             : Focus Priority
Auto AF Point Sel EOS iTR AF    : Enable
Lens Drive When AF Impossible   : Continue Focus Search
Select AF Area Selection Mode   : Single-point AF, Auto, Zone AF, AF Point Expansion (4 point), Spot AF, AF Point Expansion (8 point), [6], [8], [9], [10], [11], [12], [13], [14]
AF Area Selection Method        : M-Fn Button
Orientation Linked AF           : Same for Vert/Horiz Points
Manual AF Point Sel Pattern     : Stops at AF Area Edges
AF Point Display During Focus   : Selected (constant)
VF Display Illumination         : Auto
AF Status Viewfinder            : Show in Field of View
Initial AF Point In Servo       : Auto
Subject To Detect               : None
Eye Detection                   : On
User Comment                    :
Sub Sec Time                    : 27
Sub Sec Time Original           : 27
Sub Sec Time Digitized          : 27
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 6000
Exif Image Height               : 4000
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Focal Plane X Resolution        : 4234.297812
Focal Plane Y Resolution        : 4232.804233
Focal Plane Resolution Unit     : inches
Custom Rendered                 : Normal
Exposure Mode                   : Auto
Scene Capture Type              : Standard
Owner Name                      :
Serial Number                   : 113021005366
Lens Info                       : 50mm f/0
Lens Model                      : RF50mm F1.8 STM
Lens Serial Number              : 3011016080
GPS Version ID                  : 2.3.0.0
Compression                     : JPEG (old-style)
Thumbnail Offset                : 31744
Thumbnail Length                : 19497
Rating                          : 0
MPF Version                     : 0100
Number Of Images                : 2
MP Image Flags                  : Dependent child image
MP Image Format                 : JPEG
MP Image Type                   : Large Thumbnail (full HD equivalent)
MP Image Length                 : 480523
MP Image Start                  : 11350528
Dependent Image 1 Entry Number  : 0
Dependent Image 2 Entry Number  : 0
Image Width                     : 6000
Image Height                    : 4000
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Flash Exposure Compensation     : 0
Drive Mode                      : Single-frame Shooting
Flash Type                      : Built-In Flash
Lens                            : 50.0 mm
Red Eye Reduction               : Off
Shooting Mode                   : Aperture-priority AE
Shutter Curtain Sync            : 1st-curtain sync
WB RGGB Levels                  : 1846 1024 1024 1719
Aperture                        : 1.8
Blue Balance                    : 1.678711
Image Size                      : 6000x4000
Lens ID                         : Canon RF 50mm F1.8 STM
Megapixels                      : 24.0
Red Balance                     : 1.802734
Scale Factor To 35 mm Equivalent: 1.0
Shutter Speed                   : 1/2500
Create Date                     : 2023:11:25 03:37:01.27+02:00
Date/Time Original              : 2023:11:25 03:37:01.27+02:00
Modify Date                     : 2023:11:25 03:37:01.27+02:00
Thumbnail Image                 : (Binary data 19497 bytes, use -b option to extract)
Preview Image                   : (Binary data 480523 bytes, use -b option to extract)
Lens                            : 50.0 mm (35 mm equivalent: 50.0 mm)
Circle Of Confusion             : 0.030 mm
Depth Of Field                  : 7.04 m (9.74 - 16.78 m)
Field Of View                   : 39.6 deg
Focal Length                    : 50.0 mm (35 mm equivalent: 50.0 mm)
Hyperfocal Distance             : 46.23 m
Light Value                     : 7.3

While this is the EXIF data that the original downloaded from Lychee provides:

ExifTool Version Number         : 12.98
File Name                       : lychee_original.JPG
Directory                       : .
File Size                       : 5.6 MB
File Modification Date/Time     : 2024:10:09 18:06:47+02:00
File Access Date/Time           : 2024:10:09 18:44:54+02:00
File Inode Change Date/Time     : 2024:10:09 18:45:11+02:00
File Permissions                : -rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 350
Y Resolution                    : 350
Image Width                     : 4000
Image Height                    : 6000
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Image Size                      : 4000x6000
Megapixels                      : 24.0

schnippl0r avatar Oct 09 '24 16:10 schnippl0r

Orientation : Rotate 270 CW

Bingo.

Record Mode : CR3+JPEG

I guess you are uploading the JPEG directly ?

ildyria avatar Oct 09 '24 16:10 ildyria

Yes, I have uploaded the JPEG.

schnippl0r avatar Oct 09 '24 16:10 schnippl0r

https://github.com/LycheeOrg/Lychee/blob/master/app/Actions/Photo/Pipes/Standalone/PlacePhoto.php#L84

ildyria avatar Oct 09 '24 18:10 ildyria

Fixed in v6 in another way. add ability to over-write the original image with a temporary backup if the image was rotated. All the smaller size are normalized but the original is reverted back.

Effectively, this is no lossless rotation, this is pure no rotation for the original.

ildyria avatar Oct 09 '24 20:10 ildyria

On v6.0.0, I'm still experiencing mostly photos in portrait mode coming back from lychee as a smaller file. Did I misconfigure something on my instance?

Also useful may be that I ran sha256sum on all files in big folder and couldn't find the hash of the (portrait mode) photo.

My diagnostics

version:                                   060000
check_for_updates:                         0
sorting_photos_col:                        taken_at
sorting_photos_order:                      ASC
sorting_albums_col:                        title
sorting_albums_order:                      ASC
imagick:                                   1
skip_duplicates:                           0
small_max_width:                           0
small_max_height:                          360
medium_max_width:                          1920
medium_max_height:                         1080
lang:                                      en
image_overlay_type:                        desc
default_license:                           none
compression_quality:                       90
grants_full_photo_access:                  1
delete_imported:                           0
mod_frame_enabled:                         1
mod_frame_refresh:                         30
thumb_2x:                                  1
small_2x:                                  1
medium_2x:                                 1
landing_page_enable:                       0
force_migration_in_production:             0
search_public:                             0
hide_version_number:                       1
SL_enable:                                 1
SL_for_admin:                              1
recent_age:                                1
grants_download:                           0
photos_wraparound:                         1
map_display:                               1
zip64:                                     1
map_display_public:                        0
map_provider:                              OpenStreetMap.org
force_32bit_ids:                           0
map_include_subalbums:                     1
update_check_every_days:                   3
has_exiftool:                              1
share_button_visible:                      0
import_via_symlink:                        0
has_ffmpeg:                                1
location_decoding:                         1
location_decoding_timeout:                 30
location_show:                             1
location_show_public:                      0
rss_enable:                                0
rss_recent_days:                           7
rss_max_items:                             100
prefer_available_xmp_metadata:             0
editor_enabled:                            1
lossless_optimization:                     0
swipe_tolerance_x:                         150
swipe_tolerance_y:                         250
local_takestamp_video_formats:             .avi|.mov
log_max_num_line:                          1000
unlock_password_photos_with_url_param:     0
nsfw_visible:                              1
nsfw_blur:                                 0
nsfw_warning:                              0
nsfw_warning_admin:                        0
nsfw_banner_override:                      
map_display_direction:                     1
album_subtitle_type:                       oldstyle
upload_processing_limit:                   4
new_photos_notification:                   0
legacy_id_redirection:                     1
zip_deflate_level:                         6
default_album_protection:                  1
allow_username_change:                     1
album_decoration:                          layers
album_decoration_orientation:              row
auto_fix_orientation:                      0
use_job_queues:                            0
random_album_id:                           starred
use_last_modified_date_when_no_exif_date:  0
layout:                                    justified
date_format_photo_thumb:                   M j, Y, g:i:s A e
date_format_photo_overlay:                 M j, Y, g:i:s A e
date_format_sidebar_uploaded:              M j, Y, g:i:s A e
date_format_sidebar_taken_at:              M j, Y, g:i:s A e
date_format_hero_min_max:                  F Y
date_format_hero_created_at:               M j, Y, g:i:s A T
date_format_album_thumb:                   M Y
upload_chunk_size:                         0
nsfw_banner_blur_backdrop:                 0
search_pagination_limit:                   1000
search_minimum_length_required:            4
photo_layout_justified_row_height:         320
photo_layout_masonry_column_width:         300
photo_layout_grid_column_width:            250
photo_layout_square_column_width:          200
photo_layout_gap:                          12
display_thumb_album_overlay:               always
display_thumb_photo_overlay:               hover
default_album_thumb_aspect_ratio:          1/1
use_album_compact_header:                  0
login_button_position:                     left
back_button_enabled:                       0
back_button_text:                          Return to Home
current_job_processing_visible:            1
SA_random_thumbs:                          0
job_processing_queue_visible:              1
login_required:                            0
enable_unsorted:                           1
enable_starred:                            1
enable_recent:                             1
enable_on_this_day:                        1
login_required_root_only:                  1
dark_mode_enabled:                         1
show_keybinding_help_popup:                0
show_keybinding_help_button:               1
disable_se_call_for_actions:               0
enable_se_preview:                         0
slideshow_timeout:                         5
keep_original_untouched:                   1
hide_nsfw_in_smart_albums_and_search:      1

klausmcm avatar Oct 29 '24 02:10 klausmcm

Is there any news on this issue as it is not quite clear whether it is fixed or not in v6.0.0 due to @klausmcm's last post?

schnippl0r avatar Nov 07 '24 18:11 schnippl0r

@schnippl0r I reverted to v5.5.1 for now and I'm using exiftran -ai * on all images before uploading. That seems to get lychee to retain the original photos.

klausmcm avatar Nov 07 '24 18:11 klausmcm

@klausmcm is it for new pictures that you just uploaded or older ones? Because it is unclear to me.

I see that you have keep_original_untouched set to 1 (good). What is the value of PHOTO_PIPES in your diagnostics?

Also useful may be that I ran sha256sum on all files in big folder and couldn't find the hash of the (portrait mode) photo.

You should also consider running it on the original folder. big is for pictures uploaded a long long time ago.

ildyria avatar Nov 07 '24 20:11 ildyria

@ildyria I'll get back to you within the next week or two. I need to take another backup before upgrading again and I'll try to also provide a sample photo.

klausmcm avatar Nov 08 '24 17:11 klausmcm

No worries. I have 9600 pictures to edit from last weekend + day job. So no hurries.

ildyria avatar Nov 08 '24 17:11 ildyria

@ildyria Weeks turned to months ... but just to close the loop, I just tried uploading a vertical photo to v6.6.5 and downloading the photo gives me a file with the same hash as the photo I uploaded so I think this issue seems to be resolved.

Thank you for your work.

klausmcm avatar Jun 23 '25 05:06 klausmcm