Skip to content

Add rule that .DirIcon should be png #27

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

Closed
probonopd opened this issue May 7, 2019 · 27 comments · May be fixed by #28
Closed

Add rule that .DirIcon should be png #27

probonopd opened this issue May 7, 2019 · 27 comments · May be fixed by #28
Assignees

Comments

@probonopd
Copy link
Member

Add check that .DirIcon should be png

Reference:
AppImageCommunity/libappimage#104 (comment)

@probonopd
Copy link
Member Author

Also, placeholders like Thumb::URI=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(...) (to be defined).

@TheAssassin
Copy link
Member

Why does it have to be PNG? Is that like, most compatible? What's the use case?

@TheAssassin
Copy link
Member

Actually, we can just mention that the old ROX filer spec also requires PNG there. We can add some explanatory stuff (like the answers to the questions I wrote in my last comment).

@probonopd
Copy link
Member Author

probonopd commented May 7, 2019

Why does it have to be PNG? Is that like, most compatible? What's the use case?

@azubieta says all thumbnails need to be PNGs, and we want to have something in the AppImage that can be used as a thumbnail without performance-costly conversions/calculations at integration time

@azubieta
Copy link
Contributor

azubieta commented May 7, 2019

@TheAssassin
Copy link
Member

@azubieta mind to send a PR?

@azubieta azubieta self-assigned this May 8, 2019
@azubieta
Copy link
Contributor

azubieta commented May 9, 2019

Also, placeholders like Thumb::URI=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(...) (to be defined).

This can only be done in libappimage as it's a reference to where the AppImage file is located.

@TheAssassin
Copy link
Member

@azubieta well you can write it into the spec nevertheless.

@azubieta
Copy link
Contributor

azubieta commented May 9, 2019

@azubieta well you can write it into the spec nevertheless.

The .DirIcon must follow the spec but adding such placeholders will be pointles as the files will have to be edited anyway. I consider that we should not annoy people with it.

@TheAssassin
Copy link
Member

Makes sense. Didn't get fully clear from the previous comments.

@probonopd
Copy link
Member Author

The .DirIcon must follow the spec but adding such placeholders will be pointles as the files will have to be edited anyway. I consider that we should not annoy people with it.

I don't get it. The point of the placeholder is that one can do a search and replace of strings without the need for an image library (e.g., using C in runtime.c).

@TheAssassin
Copy link
Member

We have to extract the icon anyway, so we can just read it into memory normally and edit it on demand. No need to add such a rule to the specification, which would also break the backwards compatibility. We have too do it anyway for all old AppImages, and this "optimization" just creates many issues code wise. The gain is very little, actually, you could claim that this would add bloat to the PNG file.

@probonopd
Copy link
Member Author

So, how are the Thumb::URI= and other tags going to be inserted? Can it be done in pure C?

@TheAssassin
Copy link
Member

Anything can be done. But, no need for it, is there? We just do it with libappimage when registering AppImages.

@probonopd
Copy link
Member Author

We just do it with libappimage when registering AppImages.

Isn't that what we said is a) requiring integration-time dependencies that we want to get rid of, and b) time-consuming? (some measurements would be good)

@TheAssassin
Copy link
Member

Any updates on this? Waiting for this to be implemented to adjust checks in appimagelint.

@probonopd
Copy link
Member Author

Which part of this ticket do you mean with "this"?

@TheAssassin
Copy link
Member

Is there an official rule in the spec that says "must be PNG, anything else is invalid"?

@probonopd
Copy link
Member Author

So the logic is that in order to be able to use .DirIcon as a thumbnail icon with minimal overhead for the thumnailer, it should be a 256x256 png. Correct?

@TheAssassin
Copy link
Member

@azubieta your call.

@azubieta
Copy link
Contributor

So the logic is that in order to be able to use .DirIcon as a thumbnail icon with minimal overhead for the thumnailer, it should be a 256x256 png. Correct?

Yes, using the maximum icon size is the preferred way. Reducing the size of an image doesn't produce ugly results and it's something that desktop environments can easily do. Additionally we can save any image manipulation on libappiamge. The image metadata should (still have to look for a header only lib to do that) be edited with a minimum effort.

@TheAssassin
Copy link
Member

@probonopd please update the spec if you reference this issue in other issues. This is not even a rule yet, so it shouldn't be carried out as such yet.

@probonopd
Copy link
Member Author

probonopd commented Jun 30, 2019

Closed in fc746b5

@TheAssassin
Copy link
Member

Now, "should" it be a PNG, or "must" it be a PNG? That's a big difference for appimagelint.

@probonopd
Copy link
Member Author

probonopd commented Jun 30, 2019

For now it should, otherwise you'd get a lot of fails on existing AppImages.

@TheAssassin
Copy link
Member

Well it's a spec draft, it's not like we'd make releases. For the next type we have to professionalize this a bit, I'd like to have versions myself, really useful for governance. The next runtime should also be released under the terms of the zlib license, current license (MIT) has a few drawbacks.

@probonopd
Copy link
Member Author

Drawbacks: namely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants