user2310894
user2310894

Reputation: 23

how to make JPG image transparent background?

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

Upvotes: 2

Views: 11266

Answers (3)

Marco Tolk
Marco Tolk

Reputation: 832

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.

Upvotes: 2

Glorfindel
Glorfindel

Reputation: 22641

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:

enter image description here

Upvotes: 2

VISHMAY
VISHMAY

Reputation: 709

check its mime type, it must be renamed .png to .jpg

Upvotes: 0

Related Questions