Author Topic: Using *.png images  (Read 225 times)

jym_ing

  • Newbie
  • *
  • Posts: 32
Using *.png images
« on: June 16, 2017, 11:46:10 PM »
Dear DesignCad experts,
When I load png images, the background is opaque (like jpg); how can I get the background transparent?

Thank you

(using DesignCad Max 24)

Bob P

  • Hero Member
  • *****
  • Posts: 1140
    • Era Replica Automobiles
Re: Using *.png images
« Reply #1 on: June 17, 2017, 06:36:57 AM »
The transparent background is created by an image editor. Usually it's an option when saving png's or gifs. It was a little confusing, but I just used Irfanview to make a transparent-background png picture.

Here (apparently) is a free online program to do it.
http://www141.lunapic.com/editor/?action=load

Dr PR

  • Hero Member
  • *****
  • Posts: 5398
Re: Using *.png images
« Reply #2 on: June 17, 2017, 09:16:04 PM »
In Photoshop if you save a PNG with a background layer enabled, the background is opaque. If you disable the background layer the PNG background will be transparent.

So it is a matter of how the PNG image was saved.

Phil
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2484
Re: Using *.png images
« Reply #3 on: June 21, 2017, 04:28:18 PM »

Does dcad support transparent backgrounds?


Lar

Dr PR

  • Hero Member
  • *****
  • Posts: 5398
Re: Using *.png images
« Reply #4 on: June 22, 2017, 01:05:26 AM »
Yes, the latest version (V26.1) does allow transparent backgrounds in bitmap images.

I loaded a PNG image with an irregular shape and transparent background and moved it to layer 2.

Then I drew a line across the image in layer 1.

I selected the image and used "Edit/Selection Edit/Display Order/Move to Top" to ove the bitmap to display above everything else.

The line crossed behind the bitmap and was visible where the bitmap had a transparent background. The irregular bitmap image shape overlaid the line.

Phil

NOTE: JPG or JPEG images do not have transparent backgrounds so they always have a rectangular outline with an opaque background.
« Last Edit: July 07, 2017, 08:49:44 PM by Dr PR »
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2484
Re: Using *.png images
« Reply #5 on: June 27, 2017, 02:18:26 PM »
Hmmm, I did not know that. I recently tried (with not too much effort) with a png image where I deleted all the white background and it was not transparent. I'll give it another go sometime later.

Lar

Dr PR

  • Hero Member
  • *****
  • Posts: 5398
Re: Using *.png images
« Reply #6 on: June 28, 2017, 10:36:42 AM »
Lar,

I created the test PNG with Photoshop. It allows separate control of the background layer. If I save a PNG with the background enabled (visible) the image will not have a transparent background.

So it may depend upon the program the PNG was saved from. Some may automatically add a background.

Phil
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2484
Re: Using *.png images
« Reply #7 on: July 07, 2017, 06:08:45 PM »
I got it working, not only had to delete the background from the layer but also had to enable 'transparent background' when saving in my image program.

This opens a whole lot of doors for me.

Lar

Just wondering... will the transparent background make parts of a solid invisible when using texture mapping... mmmm...