Transparent Images in LC

hh hh at hyperhh.de
Thu Mar 30 15:35:23 EDT 2017


Yes, I also have seen this sometimes when special kinds of alphachannel
(flattened/premultiplied/postmultiplied) were used in the PNG to import.

Nevertheless the following 'standard' import script works for me nearly
always in LC 6/7/8/9:

on mouseUp
  set the paintcompression to RLE
  if there is no img "import" then create img "import"
  -- handles alphachannel clever, even creates sometimes its own:
  set the resizequality of img "import" to "best" 
  put "Select a file to import" into prmpt
  answer file prmpt titled prmpt -- avoid mac 10.12 bug
  if it is empty then exit mouseUp
  put URL("binfile:" & it) into img "import"
  -- don't "hide" my click region with transpareny:
  set topleft of img "import" to the bottomleft of me
end mouseUp

> Paul D. wrote:
> I was trying to import (as a control) a transparent PNG (i.e. the
> "white" parts allow whatever is underneath to show through) and instead
> of transparancy, I get the slashed background lines transparent PNG are
> often displayed with. Thinking it might be the PNG itself, I have our
> graphics person create a PNG that was transparent and shows up as
> transparent in other app, it still was not importing with the
> transparent parts transparent in LC.




More information about the use-livecode mailing list