-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to open PNG files #24
Comments
That's pretty weird. Sounds like an error coming from the PNG library that isn't being handled right in xv, perhaps, but I'm not sure. Sounds like a library problem that's being exasperated by bad error handling is my guess. I don't think I'm going to have time to dig into this one anytime soon though, but maybe someone else can. |
Did you build xv with PNG support? If not, this would result in the format not being supported. Note that it is not good enough just to set "XV_ENABLE_PNG" to true for CMake. You must also have the PNG library actually installed and it must be found by CMake; otherwise, a warning will be issued and "XV_ENABLE_PNG" will be automatically set to false. |
That's a good point I hadn't considered, this does indeed sound like xv might not be able to find your PNG library. |
I'm pretty sure it is built with PNG support as I'm using the FreeBSD ports collection to build it. The official binary package (from pkg) as well as the one I built from ports has the same issue. Running |
Can you open the two PNG files in the data/images directory of the xv repository? They all work for me with the most recent commit on the main branch. |
I tried opening all the images on data/images and all except the two PNGs open correctly. Are you also on FreeBSD? |
I was testing with Fedora 40. On this platform, both of the PNG files are correctly opened by xv. |
I have no difficulty opening those PNG files on my 14.1-STABLE using xv v5.2 and v6.0. I also build the ports myself using a poudriere environment. What does
Just to verify xv thinks it can use PNG:
xv is finding the libraries it wants on your system, otherwise, you would see this:
BTW, what does file say those PNG files are?
Lastly, what does |
That is weird.. Here's all the outputs from my machine. (xv from quarterly pkg)
I can open all PNGs just fine with other programs like feh. |
Heh. That was going to be one of my next questions (i.e., feh). At least, it seems like the png library is good. More things to try:
|
First two didn't show any errors, nothing related on Xorg.0.log either and ~/.xsession-errors doesn't exist. |
Do you have I should have asked you to run I think that |
That package was missing on my system. Installing it did indeed solve the problem :) |
That is good news. It would be great if you created a PR there or a bug report (https://bugs.FreeBSD.org/). |
I could reproduce the problem. xv_mgcsfx contains: in this case xv_mgcsfx overwrites the libpng binding. When this line is commented out, xv can open PNG images without netpbm suggested patch:
|
add xrandr support force libpng for PNG images jasper-software/xv#24
Hello. I'm using FreeBSD 14.1. Recently after an update (haven't done so for like 2 years haha) my xv got upgraded to this fork. Since then I'm not able to open PNG any files that previously opened without problems. It simply displays "file.png: unknown format" and "Couldn't load file '/path/to/file.png'." popups and close.
This happens on both 5.0.0-20240206 and 5.2.0-20240625 (i have two machines each on different xv version) Sorry I'm new to xv so can't dig deeper..
The text was updated successfully, but these errors were encountered: