flameshot-org/flameshot

Image has wrong resolution metadata when a vertical monitor is connected

Open

#3,847 建立於 2025年2月18日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)C++ (29,897 star) (1,916 fork)batch import
BugGood first issue

描述

Flameshot Version

Flameshot v12.1.0 (7aa69e4e) Compiled with Qt 5.15.16

flameshot-git from AUR

Installation Type

User repository (AUR)

Operating System type and version

Up to date Arch linux

Description

Images taken with flameshot distorts when I include it in a latex document and compile it with pdflatex or lualatex. It also happens when including a image into a md file and converting it to a PDF using pandoc.

I guess it's some kind of metadata issue as it's fixed when converting the image with convert image.png -strip -density 300 converted.png


Image:
  Filename: image.png
  Permissions: rw-r--r--
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 743x345+0+0
  Resolution: 37.8x63.78
  Print size: 19.6561x5.40922
  Units: PixelsPerCentimeter
  Colorspace: sRGB
  Type: TrueColor
  Endianness: Undefined
  Depth: 8-bit
  Channels: 3.0
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Pixels: 256335
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 23.0503 (0.0903932)
      median: 10 (0.0392157)
      standard deviation: 42.9301 (0.168353)
      kurtosis: 13.1757
      skewness: 3.65033
      entropy: 0.197324
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 25.0201 (0.0981181)
      median: 14 (0.054902)
      standard deviation: 38.6762 (0.151671)
      kurtosis: 15.2523
      skewness: 3.86002
      entropy: 0.194134
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 29.3873 (0.115244)
      median: 18 (0.0705882)
      standard deviation: 40.3997 (0.15843)
      kurtosis: 15.3
      skewness: 3.90189
      entropy: 0.197515
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 25.8192 (0.101252)
      median: 14 (0.054902)
      standard deviation: 40.6686 (0.159485)
      kurtosis: 14.576
      skewness: 3.80408
      entropy: 0.196324
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33,0.03)
    green primary: (0.3,0.6,0.1)
    blue primary: (0.15,0.06,0.79)
    white point: (0.3127,0.329,0.3583)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 743x345+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2025-02-18T12:11:40+00:00
    date:modify: 2025-02-18T12:11:40+00:00
    date:timestamp: 2025-02-18T12:26:50+00:00
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 743, 345
    png:pHYs: x_res=3780, y_res=6378, units=1
    signature: a3e6009196e99ea777bf3317f511c192997a9cc22760dcd73bbe1e2d0bb6c5b2
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 34775B
  Number pixels: 256335
  Pixel cache type: Memory
  Pixels per second: 64.9518MP
  User time: 0.000u
  Elapsed time: 0:01.003
  Version: ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org
Image:
  Filename: converted.png
  Permissions: rw-r--r--
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 743x345+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: TrueColor
  Endianness: Undefined
  Depth: 8-bit
  Channels: 3.0
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Pixels: 256335
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 23.0503 (0.0903932)
      median: 10 (0.0392157)
      standard deviation: 42.9301 (0.168353)
      kurtosis: 13.1757
      skewness: 3.65033
      entropy: 0.197324
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 25.0201 (0.0981181)
      median: 14 (0.054902)
      standard deviation: 38.6762 (0.151671)
      kurtosis: 15.2523
      skewness: 3.86002
      entropy: 0.194134
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 29.3873 (0.115244)
      median: 18 (0.0705882)
      standard deviation: 40.3997 (0.15843)
      kurtosis: 15.3
      skewness: 3.90189
      entropy: 0.197515
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 25.8192 (0.101252)
      median: 14 (0.054902)
      standard deviation: 40.6686 (0.159485)
      kurtosis: 14.576
      skewness: 3.80408
      entropy: 0.196324
  Rendering intent: Perceptual
  Gamma: 0.454545
  Chromaticity:
    red primary: (0.64,0.33,0.03)
    green primary: (0.3,0.6,0.1)
    blue primary: (0.15,0.06,0.79)
    white point: (0.3127,0.329,0.3583)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 743x345+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2025-02-18T12:16:52+00:00
    date:modify: 2025-02-18T12:16:52+00:00
    date:timestamp: 2025-02-18T12:28:31+00:00
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 743, 345
    signature: a3e6009196e99ea777bf3317f511c192997a9cc22760dcd73bbe1e2d0bb6c5b2
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 34581B
  Number pixels: 256335
  Pixel cache type: Memory
  Pixels per second: 63.0047MP
  User time: 0.000u
  Elapsed time: 0:01.004
  Version: ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org

Steps to reproduce

Download: as image.png Image

run convert image.png -strip -density 300 converted.png on that image or download: as converted.png Image

create a main.tex file with the content:


\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
    \includegraphics[width=0.9\linewidth]{image.png}
    \caption{original}
\end{figure}

\begin{figure}
    \includegraphics[width=0.9\linewidth]{converted.png}
    \caption{Converted}
\end{figure}
    

\end{document}

run lualatex main.tex the resulting PDF has one distorted and one correct image

Alternative using pandoc:

Create a md file containing:

![alt text](converted.png)
![alt text](image.png)

and run pandoc test.p.md -o test.p.pdf

Screenshots or screen recordings

Latex Output Image

Pandoc Output Image

System Information

operating System

Arch linux 6.13.2-arch1-1

Monitor Config

Image

DP-0 connected 1080x1920+5760+120 left (normal left inverted right x axis y axis) 527mm x 296mm DP-2 connected 1920x1080+0+540 (normal left inverted right x axis y axis) 527mm x 296mm DP-4 connected primary 3840x2160+1920+0 (normal left inverted right x axis y axis) 710mm x 400mm

Windows manager

Xorg, Qtile

貢獻者指南