Open leres opened 11 months ago
@leres Hey there;
Can you provide a specific example case? I just opened a PNG, cropped it, and tried to save it, and it defaulted to PNG format. So it is possible the problem you are encountering requires a specific set of steps, so let me know how to reproduce it and I'll see if there's something I can do about it.
Thanks!
If I download file_example_PNG_500kB.png from file-examples.com and then:
`xv file_example_PNG_500kB.png`
and type ^S the popup menu looks like this.
I looked at the port patches for xv but I don't see anything suspicious looking there.
Interesting. I unpacked the tarchive that poudriere uses to build the port and built it manually (with no patches) and the resulting xv binary behaves correctly!
Hum... I built xv inside a poudriere jail, added a DISPLAY variable, .Xauthority file, etc. and it behaves correctly. I assume this means there's something wrong with my desktop environment but I can't find it.
@leres Confirmed -- I downloaded the file (and got an interesting message about an invalid header that flashed up and disappeared before I could read it -- not sure if that is related!), hit ctrl-s, and I got the correct result (save as png).
If you can come up with a means to reproduce this, I am very happy to look at it though, so let me know if you can figure out a way to quantify it :)
I recently noticed this too... I had a screen crop of a color display, and the PNG file was saved at greyscale (no color in text image cropped). However I needed it saved as a 8-bit sRGB PNG image (for use by "visgrep" for sub-image searching) See my notes on visgrep at... https://antofthy.gitlab.io/info/apps/visgrep.txt
I don't think however it is xv's fault, as I had similar problems using ImageMagick to convert the image (same library)
However in ImageMagick I could save using 'png24' format to ensure I get sRGB format PNG
EG: convert image png24:screen.png
The FreeBSD graphics/xv port was updated from 3.10a to 4.2.0 about a month ago. Since then I've noticed that when I edit PNG files the default save file format is PBM/PGM/PPM. Previously the format always seemed to default to the original format of the file that was opened. I tested and that's the case for JPG, GIF, and WEBP.
This seems like a regression to me?