Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
2
answers
61
views
Does convert from imagemagick misinterpret the resolution- or density-related metadata of PNG?
Let's grab a DIN A4 paper sheet in PNG format from https://www.a4-size.com/download/335/?tmstv=1739899566 . After unpacking the obtained archive, we get a4-size-portrait-pixels-600dpi.png. Let's inspect its meta data: ```bash $ exiftool a4-size-portrait-pixels-600dpi.png ExifTool Version Number : 12...
Let's grab a DIN A4 paper sheet in PNG format from https://www.a4-size.com/download/335/?tmstv=1739899566 . After unpacking the obtained archive, we get a4-size-portrait-pixels-600dpi.png. Let's inspect its meta data:
$ exiftool a4-size-portrait-pixels-600dpi.png
ExifTool Version Number : 12.57
File Name : a4-size-portrait-pixels-600dpi.png
Directory : .
File Size : 5.2 kB
File Modification Date/Time : 2020:08:28 10:46:09+02:00
File Access Date/Time : 2025:02:18 18:47:15+01:00
File Inode Change Date/Time : 2025:02:18 18:43:03+01:00
File Permissions : -rw-r--r--
File Type : PNG
File Type Extension : png
MIME Type : image/png
Image Width : 4961
Image Height : 7016
Bit Depth : 1
Color Type : Palette
Compression : Deflate/Inflate
Filter : Adaptive
Interlace : Noninterlaced
Palette : 255 255 255
Image Size : 4961x7016
Megapixels : 34.8
As we see, the resolution/density tags are missing. So let's add them, using https://unix.stackexchange.com/a/791125 :
$ dpi=600 && exiftool -o a4-size-portrait-pixels-600dpi.exiftool.png -XResolution=$dpi -YResolution=$dpi -ResolutionUnit=inches -PixelsPerUnitX=$(( dpi * 10000 / 254 )) -PixelsPerUnitY="$(( dpi * 10000 / 254 ))" -PixelUnits=meters a4-size-portrait-pixels-600dpi.png
1 image files created
But now:
$ convert a4-size-portrait-pixels-600dpi.exiftool.png -density 600 a4-size-portrait-pixels-600dpi.exiftool.convert.pdf
$ pdfinfo a4-size-portrait-pixels-600dpi.exiftool.convert.pdf
Title: a4-size-portrait-pixels-600dpi.exiftool.convert
Producer: https://imagemagick.org
CreationDate: Tue Feb 18 18:55:03 2025 CET
ModDate: Tue Feb 18 18:55:03 2025 CET
Custom Metadata: no
Metadata Stream: no
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 1
Encrypted: no
Page size: 234.378 x 331.465 pts
Page rot: 0
File size: 35775 bytes
Optimized: no
PDF version: 1.3
As we see, the page size is wrong. In Postscript points, the right size would have been 595 × 842 pts.
What's going on here? Are we overusing exiftool+convert, or is convert simply wrong?
We might suspect that we shouldn't need to tell the toolchain the density/resolution more than once. However, (in the ideal world) you should be able to say as often as you wish how big your pixel or your dot is (in our case, 1/600 of an inch wide and 1/600 of an inch high) to any tool in the toolchain.
AlMa1r
(1 rep)
Feb 18, 2025, 06:00 PM
• Last activity: Feb 24, 2025, 08:59 PM
5
votes
2
answers
4851
views
Convert Xcursor to PNG
*Xcursor* is a format for the graphics of the cursor in *X11* (`file` reports `X11 cursor`). `xcursorgen` allows you to convert PNG files and some metadata to Xcursor files. How do I convert an Xcursor file to PNG images? Imagemagick's `convert` unfortunately returns: >> no decode delegate for this...
*Xcursor* is a format for the graphics of the cursor in *X11* (
file
reports X11 cursor
).
xcursorgen
allows you to convert PNG files and some metadata to Xcursor files.
How do I convert an Xcursor file to PNG images?
Imagemagick's convert
unfortunately returns:
>> no decode delegate for this image format
qubodup
(2446 rep)
Nov 6, 2015, 08:00 PM
• Last activity: Feb 20, 2025, 12:36 PM
0
votes
2
answers
91
views
What's the proper way to specify the image resolution of a scanned and postprocessed PNG file in its metadata?
What's the proper way to specify the image resolution of a scanned and postprocessed PNG file in its metadata? We currently use this command: ```bash $ exiftool -o outfile.png \ -Title="Title of the scanned document" \ -XResolution=1200 \ -YResolution=1200 \ -ResolutionUnit=inches \ -PixelsPerUnitX=...
What's the proper way to specify the image resolution of a scanned and postprocessed PNG file in its metadata?
We currently use this command:
$ exiftool -o outfile.png \
-Title="Title of the scanned document" \
-XResolution=1200 \
-YResolution=1200 \
-ResolutionUnit=inches \
-PixelsPerUnitX=47244.09 \
-PixelsPerUnitY=47244.09 \
-PixelUnits=meters infile.png
1 image files created
$ exiftool outfile.png
…
Pixels Per Unit X : 47244
Pixels Per Unit Y : 47244
Pixel Units : meters
Exif Byte Order : Big-endian (Motorola, MM)
X Resolution : 1200
Y Resolution : 1200
Resolution Unit : inches
Y Cb Cr Positioning : Centered
…
Ignoring the part that sets the title (which we included just because we do this all the time anyway), is this the right way to specify the image resolution or density, or are some parts superfluous or even completely useless, or is anything missing?
In case *Pixels Per Unit {X|Y}* are needed (which programs use it over *{X|Y} resolution* ?), we wish to be more precise and specify 1200 dpi × (100/2.54 inch/m) = 6000000/127 dots/m or, in decimal notation, with some reasonable precision, say, ≈ 47244.094488188976378 dots/m in *Pixels Per Unit {X|Y}*.
AlMa1r
(1 rep)
Feb 14, 2025, 04:01 AM
• Last activity: Feb 16, 2025, 05:36 PM
0
votes
0
answers
99
views
GRUB2 not showing image background
I am trying to add a Grub2 custom graphic background to my system running AlmaLinux 9 (RedHat 9 clone). My */etc/default/grub* file is: GRUB_FONT=fonts/unicode.pf2 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true #GRUB_TERM...
I am trying to add a Grub2 custom graphic background to my system running AlmaLinux 9 (RedHat 9 clone). My */etc/default/grub* file is:
GRUB_FONT=fonts/unicode.pf2
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
#GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/almalinux-swap rd.lvm.lv=almalinux/root rd.lvm.lv=almalinux/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_BACKGROUND="/boot/grub2/images/mylogo.png"
I have tried a 24bit PNG, 24bit JPG, and 8bit JPG (updating the background line accordingly), and after each change rerunning:
grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
My menu is present, as is the correct font, yet I still don't see ANY graphic background. What am I missing?
My background image is 640x480. Do I have to exactly match a screen size? (I thought it would scale).
TSG
(1983 rep)
Sep 18, 2024, 03:51 PM
• Last activity: Sep 18, 2024, 08:30 PM
0
votes
0
answers
153
views
Failing to extract image from MP3
I have MP3 files with ID3 images of type "Other". I have tried a variety of methods to extract the images, including the suggestions at https://unix.stackexchange.com/q/41287/34677 To whit: ``` $ exiftool -a -u -g1 33-Kesh_Jig.mp3 $ ffmpeg -i 33-Kesh_Jig.mp3 qwert.png $ eyeD3 --write-images=. 33-Kes...
I have MP3 files with ID3 images of type "Other". I have tried a variety of methods to extract the images, including the suggestions at https://unix.stackexchange.com/q/41287/34677 To whit:
$ exiftool -a -u -g1 33-Kesh_Jig.mp3
$ ffmpeg -i 33-Kesh_Jig.mp3 qwert.png
$ eyeD3 --write-images=. 33-Kesh_Jig.mp3
$ eyeD3 --write-images=/tmp 33-Kesh_Jig.mp3
$ eyeD3 --write-images=tmp 33-Kesh_Jig.mp3
$ ffmpeg -i 33-Kesh_Jig.mp3 -an -c:v copy file.jpg
$ ffmpeg -i 33-Kesh_Jig.mp3 -an -c:v copy file.png
$ exiftool -a -G4 "-picture*" 33-Kesh_Jig.mp3
$ exiftool -picture -b 33-Kesh_Jig.mp3 > other.png
$ eog other.png
$ most other.png
$ exiftool -W %d%f_%t%-c.%s -b -preview:all DIR
$ exiftool -W %d%f_%t%-c.%s -b -preview:all /tmp
$ exiftool -W %d%f_%t%-c.%s -b -preview:all /tmp 33-Kesh_Jig.mp3
$ most 33-Kesh_Jig_Picture.dat
(most
is simply a pager that automatically detects binary data and displays it in a hex dump format.)
Either I get no file at all, or I get a file which contains IHDR
and Adobe XMP text strngs in it. When the file is played with VLC, the image shows up correctly. So it does not appear to be corrupt.
ffprobe
has an error Unknown attached picture mimetype: , skipping.
but exiftool -a -u -g1 33-Kesh_Jig.mp3
reports:
Picture MIME Type :
Picture Type : Other
Picture Description : ‰PNG. .
Picture : (Binary data 707734 bytes, use -b option to extract)
Ubuntourist
(191 rep)
May 28, 2024, 05:41 PM
0
votes
2
answers
233
views
Is there a way to find all PNG files in a folder that have transparent pixels
I have a couple thousand PNGs, all of them probably support the alpha channel but only some of them actually use it (Only some of them actually have transparent pixels). Is there any way at all for me to quickly find all such files?
I have a couple thousand PNGs, all of them probably support the alpha channel but only some of them actually use it (Only some of them actually have transparent pixels).
Is there any way at all for me to quickly find all such files?
Cestarian
(2438 rep)
Mar 31, 2024, 06:20 AM
• Last activity: Apr 3, 2024, 01:58 PM
0
votes
1
answers
293
views
How to scan barcode in JPEG format with zbar in Linux?
I am working on an embedded Linux system (kernel-5.10.24). Now I am trying to use `zbar-0.23` to scan barcodes in JPEG format, but I don't know how to do that. There is an example/scan_image.c, which can scan barcodes in `PNG` format, but my barcodes are all in `JPEG` format. So how to scan the barc...
I am working on an embedded Linux system (kernel-5.10.24). Now I am trying to use
zbar-0.23
to scan barcodes in JPEG format, but I don't know how to do that.
There is an example/scan_image.c, which can scan barcodes in PNG
format, but my barcodes are all in JPEG
format.
So how to scan the barcodes in JPEG
format with zbar
? What are the interfaces in libzbar
can be used to do the JPEG barcode scanning?
wangt13
(631 rep)
Mar 8, 2024, 02:36 PM
• Last activity: Mar 14, 2024, 09:06 AM
1
votes
1
answers
649
views
difference between convert -quality and convert -resize and convert -density
I'm trying to reduce file size of a .png in the terminal with Imagemagick `convert` Does anyone know the difference between `convert -quality` , `convert -resize` and `convert -density` ? `convert -quality` does not seem to work at all, whether you give it 99, 30, 10 or 1. It changes the file size s...
I'm trying to reduce file size of a .png in the terminal with Imagemagick
convert
Does anyone know the difference between convert -quality
, convert -resize
and convert -density
?
convert -quality
does not seem to work at all, whether you give it 99, 30, 10 or 1. It changes the file size sometimes even making it bigger!
This is a file of about 10MB. I am trying to bring it down to perhaps 1MB.
I am scared that convert -resize
might do something to it such that if someone goes to print it out it will not be the size of an A4 page anymore.
cardamom
(662 rep)
Feb 22, 2024, 10:40 AM
• Last activity: Feb 22, 2024, 11:00 AM
31
votes
3
answers
41668
views
How to get the DPI of an image file (PNG)
If I export an image with lets say 300 DPI and I read out its meta-info with any application that can do it (like `file`, `exiftool`, `identify`,`mediainfo` etc.), I always get a value showing Image-Width and Image-Height. In this case: `2254 x 288` how do I get the 300 DPI value, or the correspondi...
If I export an image with lets say 300 DPI and I read out its meta-info with any application that can do it (like
file
, exiftool
, identify
,mediainfo
etc.), I always get a value showing Image-Width and Image-Height.
In this case: 2254 x 288
how do I get the 300 DPI value, or the corresponding value from any other image file?
Since in my case the proportional value of Image-Width and Image-Height does not matter I want to be able to check the resolution of any image to be able to compile new images with the same quality independent of their proportion, since this varies on every file.
For my workflow I'm especially interested in any command line solution, though any others are of course highly appreciated too.
nath
(6094 rep)
Nov 23, 2017, 02:35 AM
• Last activity: Nov 3, 2022, 10:32 AM
0
votes
1
answers
583
views
Why are my PNG files becoming corrupt so frequently?
I use R/RStudio to draw graphics and maps, and save them as PNG. Along the creation process, I save the same file over and over, to see how it's going, until I get to the final product. Sometimes the file is fine, I send it to someone or upload somewhere, just to find out later (minutes, hours, days...
I use R/RStudio to draw graphics and maps, and save them as PNG. Along the creation process, I save the same file over and over, to see how it's going, until I get to the final product. Sometimes the file is fine, I send it to someone or upload somewhere, just to find out later (minutes, hours, days...) that the files are not correct anymore (the uploaded version is ok). Sometimes they become blank, other times they become one of the previous versions.
The example below happened just now. I had to make the map in R again. The final product:
and the version to which it reversed just in front of my eyes (I saw the icon on Nautilus loading again)
Both files have the exact same size in bytes.


cmd
shows 355,715 different bytes. A previous corruption in other file was much smaller (dozens of different bytes), but the image became blank, though both files also had the same size in bytes.
This used to happen in my previous Debian (10) and happens in the current too (11). Also happened with the previous SSD (120 GB) and with the new one (240 GB, both Kingston). Sometimes the files are stored in the SSD, sometimes in a HDD.
I'm searching for thinks like Debian PNG corrupt files
, but haven't found anything. There was no power shortage that I noticed. The frequency of this error is too high to be ignored. And PNG's are the only file I noticed getting corrupt, except for a single ODT (where hours of changes had their track lost).
Do I have a virus? What's going on?
EDIT
I've filed an issue [here](https://github.com/rstudio/rstudio/issues/11798) .
Rodrigo
(1894 rep)
Aug 18, 2022, 10:07 PM
• Last activity: Aug 19, 2022, 05:21 PM
0
votes
0
answers
764
views
BASH: How to check if a file with a specific content is inside a png image
I have recently found a way to put files inside a PNG image without destroying the image using `cat example.png example.7z > example-combined.png`, which also works with standard ZIP archives. This puts the files inside the archive into the png file and stores that in the new PNG file which still sh...
I have recently found a way to put files inside a PNG image without destroying the image using
cat example.png example.7z > example-combined.png
, which also works with standard ZIP archives. This puts the files inside the archive into the png file and stores that in the new PNG file which still shows the original image but if opened with e.g. 7zip reveals the files inside.
I want to know if there's a way to check if e.g. a text file named verified.txt with the text "I am Lampe2020" is inside that PNG file's archive section. Is that maybe possible without unpacking the whole thing, to make it quicker and less hard drive intensive?
Yes, I've seen https://unix.stackexchange.com/questions/645447/how-to-grep-inside-a-specific-file-in-tar-gz-without-extracting , but I am not sure if there's a way to do that with a PNG as I can't use tar
for a PNG archive.
Lampe2020
(115 rep)
Apr 4, 2022, 08:11 PM
• Last activity: Apr 4, 2022, 08:43 PM
2
votes
1
answers
306
views
Merge a png on top of a gif with shell
I am trying to merge a png with a gif (put the png on top of the gif) and then have the result as a gif. I played around with `convert`, but cannot quite get it to work the way I need it. I have tried these commands so far: ```none convert layer1.png layer2.gif -append mergedLayers.gif convert-im6.q...
I am trying to merge a png with a gif (put the png on top of the gif) and then have the result as a gif.
I played around with
convert
, but cannot quite get it to work the way I need it.
I have tried these commands so far:
convert layer1.png layer2.gif -append mergedLayers.gif
convert-im6.q16: memory allocation failed `layer2.gif' @ error/gif.c/ReadGIFImage/1303.
Anybody got an idea?
milehigh
(23 rep)
Jan 18, 2022, 04:43 PM
• Last activity: Jan 19, 2022, 09:24 AM
1
votes
2
answers
661
views
Thunderbird/X11 - pasting images from clipboard/primary selection fails unless I first paste to libreoffice
If I do a screenshot to clipboard like this: ``` xsnap -png -stdout | xclip -selection primary -t image/png ``` .....then a middle-mouse-button-paste to thunderbird yields a binary paste starting with '�PNG IHDR' and bunch of gibberish (binary data). If I instead do a middle-mouse-button-paste to li...
If I do a screenshot to clipboard like this:
xsnap -png -stdout | xclip -selection primary -t image/png
.....then a middle-mouse-button-paste to thunderbird yields a binary paste starting with '�PNG IHDR' and bunch of gibberish (binary data).
If I instead do a middle-mouse-button-paste to libreoffice *first* (yes, this works), then I can paste an image into thunderbird successfully. No explicit copy (select or ctrl-c) from libreoffice required.
I expect half the reason for this is that libreoffice modifies the selection the moment I paste there. So there is a recognizable (by thunderbird) image in the selection buffer after libreoffice is done.
But I can also do:
xsnap -png -stdout | xclip -selection primary -t image/png
xclip -selection primary -t image/png -o > beforepastetolibreoffce.png
...and insert beforepastetolibreoffce.png into thunderbird.
If I paste to libreoffice and do:
xclip -selection primary -t image/png -o > afterpastetolibreoffice.png
.... I end up with:
-rw-r--r-- 1 dagb dagb 6505 aug. 21 13:48 beforepastetolibreoffice.png
-rw-r--r-- 1 dagb dagb 27914 aug. 21 13:49 afterpastetolibreoffice.png
...confirming my theory above. libreoffice modifies the primary selection.
thunderbird is equally unhappy about the jpeg format which xclip writes to the primary selection buffer.
I believe I have an idea about what happens here. But how do I approach debugging this further? Unsure if the bug here lies with xclip or firefox, even if libreoffice can parse the selection buffer as written by xclip.
Dag B
(11 rep)
Aug 21, 2020, 12:04 PM
• Last activity: Oct 19, 2021, 05:12 AM
-2
votes
1
answers
1316
views
read apng (Animated PNG)
How to see those kinds of animations ---------- Apparently Firefox support them, but isn't there a more dedicated software for that, a lighter one? A software dedicated to see a picture or something
How to see those kinds of animations
----------
Apparently Firefox support them, but isn't there a more dedicated software for that, a lighter one? A software dedicated to see a picture or something
wxi
(189 rep)
Dec 11, 2020, 10:53 AM
• Last activity: Dec 11, 2020, 11:13 AM
5
votes
1
answers
17082
views
Imagemagick used to generate PPM's in Linux, PPM's are unreadable
I need to generate PPM's as raw data sources for one program. I have a bunch of png's as Input, which I'm going to convert ppm's. When I try a tool like `mogrify` it generates files, but these are unreadable to any image viewer programs such as GIMP: mogrify -format ppm *.png I have installed `netpb...
I need to generate PPM's as raw data sources for one program. I have a bunch of png's as Input, which I'm going to convert ppm's. When I try a tool like
mogrify
it generates files, but these are unreadable to any image viewer programs such as GIMP:
mogrify -format ppm *.png
I have installed netpbm
package. I tried to open some other random PPM's from other places, any image viewer can open and read those files, the problem exists with my own generated files. The files created with mogrify
seem to have the right size for their resolution and contains bits.
In hex file viewer working file header looks like:
> P6 640 480 25
Mine generated with Imagemagick:
> P7 WIDTH 640 HEIGHT 480 DEPTH 3 MAXVAL 255 TUPLTYPE RGB ENDHD
Probably I need to give Imagemagick some other parameters to make correct file format, but what? Or is there another tool which can easily convert png's to ppm's?
IBr
(1775 rep)
May 29, 2013, 01:32 PM
• Last activity: Nov 12, 2020, 11:43 PM
7
votes
5
answers
6698
views
How to convert multiple XCF files to PNG?
I have a folder with a lot of `xcf` files which I want all to be converted to `png` files, at best via a one-liner from bash. How can I achieve such a task?
I have a folder with a lot of
xcf
files which I want all to be converted to png
files, at best via a one-liner from bash.
How can I achieve such a task?
k0pernikus
(16501 rep)
Apr 14, 2013, 11:52 PM
• Last activity: Aug 29, 2020, 07:01 PM
1
votes
2
answers
2164
views
Convert pdf to png, size issue
I have a pdf file created from an impress presentation. I want to convert the pdf to png images to add them to create a video using them. I am using pdftoppm to convert the pdf to png, but the exported images are getting a size of 1654x931 px. I need 1920x1080, as my video is going to be in that res...
I have a pdf file created from an impress presentation. I want to convert the pdf to png images to add them to create a video using them. I am using pdftoppm to convert the pdf to png, but the exported images are getting a size of 1654x931 px. I need 1920x1080, as my video is going to be in that resolution.
The command I am using is the following:
pdftoppm -png report.pdf report
In Impress I haven't found any setting the set the size of the exported pdf, and I haven't been able to find anything to set the size of the png conversion.
Is there anyway to adjust the size of the generated pngs?
jjcasmar
(353 rep)
May 30, 2020, 02:19 PM
• Last activity: Jul 6, 2020, 08:17 PM
1
votes
1
answers
99
views
Method to layout graphics file and pdf file for printing
I'm working on a project to automate the creation of shipping labels, ([Avery 8127][1]) to be exact. I get a PNG of the USPS/UPS/FedEx shipping label, but the packing slip can vary between a PDF or a screenshot of a webpage. My initial (quasi successful) solution was to use ImageMagick to manipulate...
I'm working on a project to automate the creation of shipping labels, (Avery 8127 ) to be exact. I get a PNG of the USPS/UPS/FedEx shipping label, but the packing slip can vary between a PDF or a screenshot of a webpage.
My initial (quasi successful) solution was to use ImageMagick to manipulate the USPS label, convert the packing slip to a PNG and again, use ImageMagick to append them together to create a single graphics file with both images laid out correctly.
However, this isn't ideal. I'd like the ability to generate a new document (whatever it may be, PDF, PS, image, etc.) where I layout the graphic where it needs to be and insert the text below it. I'd like to have the ability to change the font size or add/remove text as needed.
What tools are available for this type of thing? How can I create and lay out a new document *programmatically* based on a graphics file and a file containing text?
(Could I do this with a CUPS printer filter?)
I'm currently working on macOS, but I'm looking for something portable so I can easily move it to a FreeBSD server later.
Allan
(1090 rep)
Apr 28, 2020, 02:02 PM
• Last activity: Apr 28, 2020, 05:42 PM
5
votes
1
answers
4119
views
Drawing a straight line with Pinta
I'm trying to superimpose a straight line onto a .png image. [GIMP][1] is notoriously impossible to use for simple things, so people have suggested [Pinta][2]. However, as far as I can tell, the only lines you can draw with this program are freeform ones, i.e., there doesn't appear to be anything li...
I'm trying to superimpose a straight line onto a .png image. GIMP is notoriously impossible to use for simple things, so people have suggested Pinta .
However, as far as I can tell, the only lines you can draw with this program are freeform ones, i.e., there doesn't appear to be anything like a ruler tool. How can I draw a straight line?
Or is there another program that does it? Again, I need to be super-imposing on an existing .png file, so Xfig won't work.
Leo Simon
(453 rep)
Nov 4, 2019, 10:07 PM
• Last activity: Apr 15, 2020, 04:16 AM
1
votes
1
answers
1754
views
Why are my PNGs executable?
I noticed that most of my image files are green when the `ls` command is used but some of them look purple. [Apparently .png and .jpg files are supposed to look Magenta while executable files are Green.](http://pthakkar.com/2013/03/linux-color-files-ls-command/) But when making a Beamer presentation...
I noticed that most of my image files are green when the
ls
command is used but some of them look purple. [Apparently .png and .jpg files are supposed to look Magenta while executable files are Green.](http://pthakkar.com/2013/03/linux-color-files-ls-command/)
But when making a Beamer presentation only the 'executable images' work.
Why are my PNGs executable?
I am using Ubuntu on the WSL.
I get the following error on non-executable images. Would this be a Latex error?
~/LatexFiles/images/LSTM-falsepositive-DRTHIS.png: Permission denied
LaTeX Warning: File `LSTM-falsepositive-DRTHIS.png' not found on input line 32.
! Package pdftex.def Error: File `LSTM-falsepositive-DRTHIS.png' not found: usi
ng draft setting.
The stat
command gives this output:
File: images/LSTM-falsepositive-DRTHIS.png
Size: 90023 Blocks: 176 IO Block: 4096 regular file
Device: 2h/2d Inode: 5348024557507288 Links: 1
Access: (0000/----------) Uid: ( 1000/ marcus) Gid: ( 1000/ marcus)
Access: 2020-02-25 10:56:13.114775800 +0000
Modify: 2020-02-25 10:56:13.114775800 +0000
Change: 2020-02-25 11:10:56.091436300 +0000
Birth: -
Marcus
(113 rep)
Feb 25, 2020, 01:45 PM
• Last activity: Feb 25, 2020, 11:20 PM
Showing page 1 of 20 total questions