Android icon indicating copy to clipboard operation
Android copied to clipboard

Allow photo cropper to add whitespace

Open plegrand1 opened this issue 2 years ago • 12 comments

Hello, Just a very simple question: What should be the exact perfect size of the logo of each entry? Thanks Pascal

plegrand1 avatar Jun 12 '23 17:06 plegrand1

AFAIK the cards in the app are the same dimensions as physical banking and ID cards: 85.6 × 53.98 (mm).

obfusk avatar Jun 12 '23 18:06 obfusk

Yup, exactly what obfusk said. All card logos in the app are scaled to exactly that size: https://github.com/CatimaLoyalty/Android/blob/6937342226b56ef9104aab5df7a749f70f99d246/app/src/main/res/layout/loyalty_card_view_layout.xml#LL55C3-L55C3 :)

TheLastProject avatar Jun 12 '23 18:06 TheLastProject

And when selecting an image, you are offered the option to crop it to that size as well :)

obfusk avatar Jun 12 '23 18:06 obfusk

Hello and thank you very much for your answers. Is there a "place" where I can get these logos in the right size? Thank you again.

plegrand1 avatar Jun 13 '23 05:06 plegrand1

Is there a "place" where I can get these logos in the right size?

I haven't used any thumbnails myself, so not sure. But you could take a photo of the physical card. Or try to find an example of one online. Or find an image of the store logo and crop that to the right size.

obfusk avatar Jun 13 '23 10:06 obfusk

I downloaded some logos from the net and resized them (85.6mm × 53.98mm). But every time I insert them in the application, they are "truncated".

plegrand1 avatar Jun 13 '23 11:06 plegrand1

That's odd. Would you happen to have one of those images? And a screenshot of how it looks for you? So I can take a look.

obfusk avatar Jun 13 '23 11:06 obfusk

Screenshot-Leclerc leclerc

plegrand1 avatar Jun 13 '23 11:06 plegrand1

That image is 303x75 px. So it has an aspect ratio of 303 / 75, approximately 4. Whereas 85.6 / 53.98 is approximately 1.6.

Unfortunately, the crop tool can only select part of the image, not add the extra vertical space you would need to match the aspect ratio when you need the full width of the image but the height is not sufficient.

You can do that using an image editor though: e.g. create a new image of the right size (and appropriate background colour) and add the existing image in the middle:

image

You might want to resize the logo to be a bit smaller before you do that so it has a bit of border on the sides too.

obfusk avatar Jun 13 '23 12:06 obfusk

Also: the important thing is the aspect ratio, so you might want to use larger dimensions (or DPI) for the image but keep the ratio the same, e.g. multiplying both 85.6 and 53.98 by 2 or 3, or e.g. if you have an image 1000px wide, make it 1000 * 53.98 / 85.6 = 631px high.

obfusk avatar Jun 13 '23 13:06 obfusk

Excellent !!! I followed your advice to create a blank image at the right size. Perfect!!!

plegrand1 avatar Jun 13 '23 13:06 plegrand1

I'd appreciate if the 8560:5398 ratio was shown somewhere so I can crop my photos accordingly. Maybe in the FAQ https://catima.app/faq/ or in the app itself when user clicks CARD ratio instead of 1:1 or ORIGINAL. But if most people don't care as much as me about giving Catima an image already having the exact right ratio, I can certainly understand not wanting to put it in.

ukanuk avatar Nov 24 '23 21:11 ukanuk