1 Reply Latest reply on Dec 12, 2008 5:52 AM by James Newton, ACP

    URGENT: Problem with imaging Lingo

    Level 7
      This is a multi-part message in MIME format.

      ------=_NextPart_000_0006_01C95BDE.CB40D1E0
      Content-Type: text/plain;
      charset="koi8-r"
      Content-Transfer-Encoding: quoted-printable

      Hi

      I need to create in runtime an image with transparent areas, composed of =
      many other images with transparencies - for example - I have images =
      with single letters(imported as PNG, all area outside of each letter is =
      transparent) and want to create one member which some text, all area =
      except of the text should also be transparent

      My first problem is - first of all I should create a transparent image

      I do it in following way:
      I create an image object, and then fill it with transparent pixel, taken =
      form the top-left corner of some letter-image
      newImage =3D image(cWidth, cHeight, 32, 8)

      newImage.copyPixels(srcMember.image, newImage.rect, rect(0,0,1,1))

      Is this correct or can I create an transparent image in some other, more =
      correct way?

      Second problem - when I copy my letters into destination image through =
      next series of copyPixels commands , something happens to transparency - =
      it looks like semi trasparent pixels become more transparent - and =
      therefore sometimes almost unvisible.

      Can it be that transparency of background fill affects transparency (or =
      multyplies with transparency) of objects, that are added to the image =
      later?

      I could live with this problem until my projects run on PC, but under =
      MAC the created text looks awfull and I should in any way solve it, it =
      is very urgent, please help

      Thanx in advance

      Yurij





      ------=_NextPart_000_0006_01C95BDE.CB40D1E0
      Content-Type: text/html;
      charset="koi8-r"
      Content-Transfer-Encoding: quoted-printable

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD>
      <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
      <META content=3D"MSHTML 6.00.6000.16762" name=3DGENERATOR>
      <STYLE></STYLE>
      </HEAD>
      <BODY>
      <DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>I need to create in runtime an image =
      with=20
      transparent areas, composed of many other images with transparencies - =
      for=20
      example - I have  images with single letters(imported as PNG, =
      all area=20
      outside of each letter is transparent) and want to create one =
      member which=20
      some text, all area except of the text should also be =
      transparent</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>My first problem is - first of all I =
      should create=20
      a transparent image</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
      <DIV><FONT face=3DArial size=3D2>I do it in following way:</FONT></DIV>
      <DIV><FONT face=3DArial size=3D2>I create an image object, and then =
      fill it=20
      with transparent pixel, taken form the top-left corner  of =
      some=20
      letter-image</FONT></DIV>
      <DIV>
      <P><FONT face=3DArial size=3D2>newImage =3D<FONT color=3D#008000><FONT =
      color=3D#008000>=20
      image</FONT></FONT>(cWidth, cHeight,<FONT color=3D#808080><FONT =
      color=3D#808080>=20
      32</FONT></FONT>,<FONT color=3D#808080><FONT color=3D#808080>=20
      8</FONT></FONT>)</FONT></P></DIV>
      <DIV>
      <P><FONT face=3DArial size=3D2>newImage.copyPixels(srcMember.image, =
      newImage.rect,=20
      rect(0,0,1,1))</FONT></P>
      <P><FONT face=3DArial size=3D2>Is this correct or can I create an =
      transparent image=20
      in some other, more correct way?</FONT></P>
      <P><FONT face=3DArial size=3D2>Second problem - when I copy my letters =
      into=20
      destination image through next series of copyPixels commands , =
      something=20
      happens to transparency - it looks like semi trasparent pixels become =
      more=20
      transparent - and therefore sometimes almost unvisible.</FONT></P>
      <P><FONT face=3DArial size=3D2>Can it be that transparency of background =
      fill=20
      affects transparency (or multyplies with transparency) of objects, that =
      are=20
      added to the image later?</FONT></P>
      <P><FONT face=3DArial size=3D2>I could live with this problem until my =
      projects run=20
      on PC, but under MAC the created text looks awfull and I should in any =
      way solve=20
      it, it is very urgent, please help</FONT></P>
      <P><FONT face=3DArial size=3D2>Thanx in advance</FONT></P>
      <P><FONT face=3DArial size=3D2>Yurij</FONT></P>
      <P><FONT face=3DArial size=3D2></FONT> </P>
      <P><FONT face=3DArial size=3D2></FONT> </P></DIV></BODY></HTML>

      ------=_NextPart_000_0006_01C95BDE.CB40D1E0--