how to make JPG image transparent background?
Solution 1
The provided example image is in fact not a JPEG, but a png file. It has the extension and mime-type of a jpeg file, but it's contents are in png format.
JPEG file format does not support transparacy.
So if you need transparancy in images for use in browsers. You can either:
- convert the image to png, this works in all browsers
- use ZorroSVG, requires SVG support but results in smaller files for photographic images.
- use webp, only use when you have fallbacks in place for browsers that do not support webp.
Solution 2
The new JPEG-XR standard supports transparency.
However, this is not a real JPG, it's a PNG. If you rename it to .txt
, you can see that the contents of the file start with PNG
:
user2310894
Updated on June 05, 2022Comments
-
user2310894 almost 2 years
As we all know that jpg image format does not support transparency. so we use .png format.
i was surfing on net and i found an image with .jpg format and transparent. it is wonder how a jpg format image can be transparent.
here is the example image. http://bdthemes.net/demo/joomla/intensy/images/sampledata/features/top_b.jpg