Rotating Images Alters Images in Unwanted Ways with Gwenview and digiKam

I have been going through many old images with digiKam to tag and otherwise organize them. When I rotate images, a thin strip of the image is cut off and placed on the opposite side. If I rotate the image back, the damage gets undone. Here is an example of this phenomenon:

Example Image

System Information

Operating System: Manjaro Linux
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11
Kernel Version: 6.6.8-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-4570S CPU @ 2.90GHz
Memory: 7.7 GiB of RAM
Graphics Processor: NVE7
Manufacturer: Apple Inc.
Product Name: iMac14,3
System Version: 1.0

Thank you for reading.

Hi @dewbsku and welcome to the Manjaro community

This seems like an issue that might best be handled by Digikam Support (KDE). The KDE forum might also be helpful.

If you save a copy of the rotated image, does this artifact appear on the saved image?

I don’t know if you’re bug has been reported or fixed, the place to report this and to search for it is:

Thank you two for pointing me to other resources. I will check those out. I also just realized that while I put Gwenview in the title, I forgot to also mention that the issue happens in the body of the post.

Yes, I can rotate in digiKam and the artifacts appear immediately. Or when using Gwenview rotate, save or save as new image, then reopen the image and the artifacts are there.

It seems like an issue with shared dependency or library; though I don’t know which it would be. Being that KDE develops both digiKam and Gwenview, they would obviously be in a better position to comment.

Perhaps open a bug report with KDE. Search their bugs list for anything similar (they tend not to appreciate duplicates).

At face value, I doubt this is a Manjaro issue. However, more information about your system might help others who may have specific insight.

Please post the output of:

inxi --admin --verbosity=7 --filter --no-host --width

(Note that personal information is filtered by this command.)

Other information that might be relevant:

  • Which specific kernel version is used *
  • Which graphic drivers are used
  • Are you using X11 or Wayland

[*] It’s often possible that switching kernel might produce positive results, but I can’t be certain in this instance.

I’m afraid I can’t help much beyond this.
I’ll chime in again, if anything else comes to mind.


Output of inxi --admin --verbosity=7 --filter --no-host --width

  Kernel: 6.6.8-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=12ee8f3b-ad2f-4864-b078-84906c387d3e rw quiet splash
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
  Type: Desktop System: Apple product: iMac14,3 v: 1.0
    serial: <superuser required> Chassis: type: 13 v: Mac-77EB7D7DAF985301
    serial: <superuser required>
  Mobo: Apple model: Mac-77EB7D7DAF985301 v: iMac14,3
    serial: <superuser required> UEFI: Apple v: date: 06/13/2019
  Message: No system battery data found. Is one present?
  System RAM: total: 8 GiB available: 7.7 GiB used: 4.6 GiB (59.7%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
  Info: model: Intel Core i5-4570S bits: 64 type: MCP arch: Haswell gen: core 4
    level: v3 note: check built: 2013-15 process: Intel 22nm family: 6
    model-id: 0x3C (60) stepping: 3 microcode: 0x28
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
    desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
    desc: 1x6 MiB
  Speed (MHz): avg: 807 high: 829 min/max: 800/3600 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 800 2: 800 3: 829 4: 800
    bogomips: 23156
  Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2
    bts clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht ibpb ibrs ida invpcid lahf_lm lm mca mce md_clear mmx
    monitor movbe msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdtscp rep_good
    sdbg sep smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm
    tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic
    xsave xsaveopt xtopology xtpr
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
  Device-1: NVIDIA GK107M [GeForce GT 750M Mac Edition] vendor: Apple
    driver: nouveau v: kernel non-free: series: 470.xx+
    status: legacy-active (EOL~2024-09-xx) arch: Kepler code: GKxxx
    process: TSMC 28nm built: 2012-2018 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s ports: active: DP-1 empty: DP-2,DP-3
    bus-ID: 01:00.0 chip-ID: 10de:0fe9 class-ID: 0300 temp: 44.0 C
  Device-2: Apple FaceTime HD Camera (Built-in) driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-7:3 chip-ID: 05ac:8511
    class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.10 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa dri: nouveau gpu: nouveau
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93") monitors: <missing: xrandr>
  Monitor-1: DP-1 model: Apple iMac built: 2012 res: 1920x1080 dpi: 103
    gamma: 1.2 size: 475x267mm (18.7x10.51") diag: 545mm (21.5") ratio: 16:9
    modes: max: 1920x1080 min: 960x540
  API: EGL v: 1.5 hw: drv: nvidia nouveau platforms: device: 0 drv: nouveau
    device: 1 drv: swrast gbm: drv: nouveau surfaceless: drv: nouveau x11:
    drv: nouveau inactive: wayland
  API: OpenGL v: 4.5 compat-v: 4.3 vendor: mesa v: 23.1.9-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: NVE7 device-ID: 10de:0fe9
    memory: 991.2 MiB unified: no
  API: Vulkan Message: No Vulkan data available.
  Device-1: Intel 8 Series/C220 Series High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20
    class-ID: 0403
  Device-2: NVIDIA GK107 HDMI Audio driver: snd_hda_intel v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s
    bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403
  API: ALSA v: k6.6.8-2-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
  Device-1: Broadcom BCM4360 802.11ac Dual Band Wireless Network Adapter
    vendor: Apple driver: bcma-pci-bridge v: N/A modules: bcma pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 14e4:43a0 class-ID: 0280
  Device-2: Broadcom NetXtreme BCM57766 Gigabit Ethernet PCIe driver: tg3
    v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: N/A bus-ID: 04:00.0
    chip-ID: 14e4:1686 class-ID: 0200
  IF: enp4s0f0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
  Device-1: Apple Bluetooth Host Controller driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-8.3:8 chip-ID: 05ac:828d
    class-ID: fe01
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  Message: No logical block device data found.
  Message: No RAID data found.
  Local Storage: total: 1.82 TiB used: 362.75 GiB (19.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Apple model: HDD HTS541010A9E662
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
    tech: HDD rpm: 5400 serial: <filter> fw-rev: B5D0 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD My Passport 264F size: 931.48 GiB block-size: physical: 512 B
    logical: 512 B type: USB rev: 3.2 spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1
    tech: N/A serial: <filter> fw-rev: 2011 scheme: GPT
  Message: No optical or floppy data found.
  ID-1: / raw-size: 931.19 GiB size: 915.49 GiB (98.32%)
    used: 362.75 GiB (39.6%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 label: N/A
    uuid: 12ee8f3b-ad2f-4864-b078-84906c387d3e
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 296 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 label: N/A
    uuid: 0E26-2BDC
  Alert: No swap data was found.
  ID-1: /dev/sda1 maj-min: 8:1 size: 200 MiB fs: vfat label: EFI
    uuid: 67E3-17ED
  ID-2: /dev/sda2 maj-min: 8:2 size: 931.32 GiB fs: apfs label: N/A
    uuid: 10dcfc80-b03a-485a-8e90-b16a2864a324
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 14 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-2: 1-5:2 info: Apple Hub in Aluminum Keyboard ports: 3 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 300mA
    chip-ID: 05ac:1006 class-ID: 0900
  Device-1: 1-5.2:4 info: Apple Aluminium Keyboard (ANSI) type: keyboard,HID
    driver: apple,usbhid interfaces: 2 rev: 2.0 speed: 1.5 Mb/s (183 KiB/s)
    lanes: 1 mode: 1.0 power: 20mA chip-ID: 05ac:024f class-ID: 0300
  Device-2: 1-7:3 info: Apple FaceTime HD Camera (Built-in) type: video
    driver: uvcvideo interfaces: 3 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s) lanes: 1
    mode: 2.0 power: 500mA chip-ID: 05ac:8511 class-ID: 0e02 serial: <filter>
  Hub-3: 1-8:5 info: Broadcom BCM2046B1 USB 2.0 Hub (part of BCM2046
    Bluetooth) ports: 3 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1
    power: 94mA chip-ID: 0a5c:4500 class-ID: 0900
  Device-1: 1-8.3:8 info: Apple Bluetooth Host Controller type: bluetooth
    driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1
    mode: 1.1 chip-ID: 05ac:828d class-ID: fe01
  Hub-4: 2-0:1 info: super-speed hub ports: 6 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Device-1: 2-1:2 info: Western Digital My Passport 264F type: mass storage
    driver: uas interfaces: 1 rev: 3.2 speed: 5 Gb/s (596.0 MiB/s) lanes: 1
    mode: 3.2 gen-1x1 power: 896mA chip-ID: 1058:264f class-ID: 0806
    serial: <filter>
  System Temperatures: cpu: 49.0 C mobo: N/A gpu: nouveau temp: 45.0 C
  Fan Speeds (rpm): N/A
  Processes: 265 Uptime: 1h 45m wakeups: 0 Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: 1168 pm: pacman pkgs: 1151 libs: 324 tools: pamac pm: flatpak
  pkgs: 17 Shell: Zsh v: 5.9 default: Bash v: 5.2.21 running-in: konsole
  inxi: 3.3.31

I am using the open source nouveau drivers. The other info is in the original post.

Thank you for your help, I will look around the bugs list and post if I can’t find a related issue. If I learn more, I will make sure to post here.

1 Like

I made a bug report on the kde bugs site.
This is the response I got.

Maik Qualmann 2023-12-31 09:07:30 UTC
We (digiKam) set the libJpeg option “transformoption.perfect = true”. From a libJpeg version >= 8, this prevents a lossless rotation from being carried out on images where this is not possible, usually because the division factor of the side length is not 8. Also see Bug 320107. Check the digiKam Help-> Component Information to see which libJpeg version digiKam is using. If you use a version smaller than 8, you have to deactivate the lossless rotation in the digiKam setup.

The libJpeg version I saw in the component information is below 8. To get around the issue in digiKam, I set Settings > Configure Digikam > Metadata > Rotation > Rotate by only setting a flag.

Thank you again for your help.

1 Like

I’d simply never approve/select to save an altered (by rotating it) image
unless I was sure of the outcome. :man_shrugging:
(it needs to be the same - just the orientation being different)

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.