OpenBazaar-Client icon indicating copy to clipboard operation
OpenBazaar-Client copied to clipboard

Transparent GIF Images Get Black Background

Open hoffmabc opened this issue 9 years ago • 7 comments

image

hoffmabc avatar Feb 07 '16 19:02 hoffmabc

We could have transparent backgrounds by switching from saving images as jpeg to saving as png. But there are some consequences:

  1. the files would be bigger
  2. they might look bad on some backgrounds
  3. currently, we handle images that 404 by having 2 background images, the second one is the default and is "under" the user's image. If the user's image has transparency, the default image shows through anywhere the top image is transparent.

#3 is the main one, we'd have to remove the default images, and if user images 404 then the image would just be blank instead of showing the default instead.

jjeffryes avatar Feb 07 '16 19:02 jjeffryes

Maybe we should just prevent the user from uploading GIFs? I mean they're not animated anyways due to the base64 conversion so I don't see the value in allowing them to be uploaded in the first place.

morebrownies avatar Feb 23 '16 00:02 morebrownies

GIFs that don't have transparent backgrounds would work fine. Though I don't think anyone uses GIFs anymore for anything but animation, so restricting them would be fine.

jjeffryes avatar Feb 23 '16 00:02 jjeffryes

Why aren't we using png anyways? It would preserve transparency.

hoffmabc avatar Feb 23 '16 00:02 hoffmabc

I think transparent images should be supported to make the software more professional. It is a lot of work for people with current websites to change all transparent images to have background colours in order to set them up in OB.

I would suggest maybe the possibility of changing the default 404 image to a white one in the store settings.

Bitfinger avatar Apr 07 '16 12:04 Bitfinger

@jjeffryes Is this resolved?

SamPatt avatar May 25 '16 20:05 SamPatt

I've updated the image code so that once Chromium supports exporting a webp image with alpha channels images with transparent backgrounds will work. Until then, we can't support them without switching to much larger pngs, which would make our bandwidth issues much worse.

jjeffryes avatar May 26 '16 15:05 jjeffryes