-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Image format #48
Comments
Hi @hpatoio, I'd prefer keeping image validation logic outside of this library as the validation process might become a little too complex. Do we just check the file extension, what happens if somehow the file extension is wrong etc. However, I guess a simple extension check won't hurt anybody ;) |
I'd go for the simple file extension check. I definitely wouldn't try to validate the image itself. I've started a PassValidator class to check for common (and frustrating) errors which cause the pass to just not work. This might be a good place for this kind of check. |
@g- that's why I wanted to add some sort of validation. I wasted hours because I was adding JPG isntead of PNG. When you open a not valid pass file the iPhone doesn't show any error message. It simply doesn't load the pass (or part of it) |
Thanks ! Let's tag a new minor release ! |
AFAIK only PNG images are allowed in pkpass files.
I was using this library and I tried to add JPG images but were not showed up. The library should throw an exception if non PNG image is added. Do you agree ? I've already a draft for this I can send a PR
The text was updated successfully, but these errors were encountered: