Copying member("aTextMemb").image into a rect in an image that uses alpha

Hi all. I'm currently developping a strategy game with Director, and one of the things I've run into is that i want to update the number of units I have in a panel (on initial game setup) via 1) updating a text member that holds the number of units left to setup and copyPixeling the image onto the panel. This I've acheived except that since my text member image doesnt have alpha originally and the panel is semitransparent, a white (no matter the bckgrnd color I set for the text member) bounding box appears in the final result. I guess the way to go is duplicating the text member image and make it a 1 bit mask image then using the apropiate imaging lingo command (dont remember if it's copyPixels or another at this point). Imaging lingo is very interesting for me since normally I built all my aplications using the score directly (15 years exp with Director). This is my first game where I mostly rely on parent scripting and in some situations imaging lingo.
This is currently the handler that does the job. It: 1) stores the image of the text member "panelCount" 2) defines the destinatiion rectangle where it will be copied in the panel bitmap and 3) copies it (but as I said the correct alpha is missing).
on updateUnitsDisplay me
  member("panelCount").text= string(pPanelUnitCount)
  -- we retrieve the image of the text member that stores how many units left in the panel
  _textImage= member("panelCount").image 
  bottomMargin= 20 -- distance from the bottom of the panel that we want the text to be
  _left= (sprite(me.spriteNum).width- _textImage.width)/2
  _top= sprite(me.spriteNum).height- bottomMargin- (_textImage.height/2)
  _right= _left+ _textImage.width
  _bottom= _top+ _textImage.height
  destRect= rect(_left, _top, _right, _bottom)
  pPanelMember.image.copyPixels(_textImage, destRect, _textImage.rect) 
end updateUnitsDisplay
Your proposals and thoughts are welcome (specially good ones )
EDIT: I've said above that my textImage wouldnt have alpha originally. Well, i think that was wrong according to what I've found in he scripting dictionary under the image() section "When you create a new image object, the background color defaults to white (color(255,255,255)), and the alpha channel is completely opaque (color(0,0,0))."
On the other hand, the paramList in the copyPixels command should do it I think (a matte can be defined, also and ink mode for the copied pixels can be used although my first experiments have not worked yet).

I think I got it. The paramList in the copyPixels command has been enough to get rid of the white box around the text (using #ink: 36 which is bckgrnd transparent in it), the problem was that I was using the same white for foreground and background colors in the text member (been some time not using director and misplaced the false white I used to use in these cases in the color selector). Bottom line, dont use exact same color values for back and fore colors of the text member. I've observed also that using the alpha of the image (useAlpha= true) makes it well antialiased while not using the alpha does produces a bad image of the text (btw, the font of the text is an inserted text media element of course). I keep investigating

Similar Messages

  • How to put image into pdf file in which image is set it in particuler frame size

    hi, i m creating app for generate pdf in which i can set image into pdf but the image sizze is large so the image is display over the text and how can i set text into pdf and also how to set textfilelds data into pdf or tableview data into pdf.help me plz

    Are you looking for image in selection column or as a separate column?
    --Shiv                                                                                                                                                                               

  • Import Images into slide show - Creating Thumbnail images -Hang

    I am using iDVD 7. I imported my images into a slideshow. The pictures were not in iPhoto but just a folder that I created and edited in Photoshop. Once I import the images, the window shows all the file names as expected but all the Image Thumbnails are blank and the top of the window there is a message "+Creating thumbnail images... (32 remaining)+" with a spinning wheel next to the message. This message stays there forever. The 32 is the number of images in the slideshow. I can do most things in iDVD while this is going on, but I cannot add the audio I want.
    What is causing this and can I get it to stop?

    To add to this I decided to remove the slideshow and now import the pictures from iPhoto. I can only get ride of the message by closing iDVD down. When I relaunch iDVD the message is gone. When I now import the pictures from iPhoto the same thing happens where it hangs on creating thumbnail images.

  • How do I insert an image into the body of a Yahoo email using Firefox?

    I've tried copy and paste from Photobucket, but that doesn't work. I'm asking how to have the image appear in the body of the email, not as an attachment.

    In Gmail, simply drag & drop into the text area;
    or mouseover the "+" in the bottom toolbar, then click the camera icon.

  • How to copy configuration files to and from the cisco ios routers that use SNMP

    Hello,
    I went on the page : https://supportforums.cisco.com/docs/DOC-1860
    You explain how to get a config file and send it to a tftp server or oppositely.
    I face this problem:
    id090365:~> snmpset -v2c -c communitystring hostipaddress .1.3.6.1.4.1.9.9.96.1.1.1.1.2.98 i 1
    Error in packet.
    Reason: noCreation (That table does not support row creation or that object can not ever be created)
    Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.2.98
    Do you have any idea?
    Thanks,
    Olivier

    I hadn't seen any snmp guides using snmpv3 and scp as transport protocol. For those looking to implement, here is what worked for me.
    As with the other snmp config copy guides you will need to download the respective MIBS and load them in the snmp.conf file.
    This post will specifically cover the snmpset commands for a v3 setup.
    SNMP Environment:
    Name        : net-snmp
    Version     : 5.7.2
    Release     : 17.fc20
    snmp conf file in ~/.snmp/snmp.conf
       contains
    defSecurityName XXX <- replace with v3 username
    defContext ""
    defAuthType SHA
    defPrivType AES
    defSecurityLevel authPriv
    defAuthPassphrase ***** <-replace with authentication pass
    defPrivPassphrase *****  <-replace with encryption pass
    defVersion 3
    showMibErrors no
    mibs ALL
    I would verify basic snmpv3 functionality with a snmpwalk of something simple like sysUpTime. When that's good proceed to the CONFIG-COPY snmp commands.
    This is my bash script that does the entire copy asking only for a single argument of IP/Hostname of the device being backed up. The 2>/dev/null shown in the script or at the cli below redirects STDERR to null to avoid the MIB modules parsing errors.
    #!/usr/bin/bash
    DEVICE=$1
    RANNUM=42
    USER=******
    PASS=******
    SERVER=X.X.X.X
    DATE=$(date +"%m_%d_%y")
    snmpset $DEVICE ccCopyProtocol.$RANNUM i 4 ccCopySourceFileType.$RANNUM i 4 ccCopyDestFileType.$RANNUM i 1 ccCopyServerAddress.$RANNUM a "$SERVER" ccCopyFileName.$RANNUM s "$DEVICE.$DATE" ccCopyUserName.$RANNUM s $USER ccCopyUserPassword.$RANNUM s $PASS ccCopyEntryRowStatus.$RANNUM i 4 2>/dev/null
    Once run you can check the status of the copy with the following command.
    [root@localhost hlsb]# snmpwalk sbs-tech-switch ciscoConfigCopyMIB 2>/dev/null
    CISCO-CONFIG-COPY-MIB::ccCopyProtocol.42 = INTEGER: scp(4)
    CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.42 = INTEGER: runningConfig(4)
    CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.42 = INTEGER: networkFile(1)
    CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.42 = IpAddress: 10.10.10.193
    CISCO-CONFIG-COPY-MIB::ccCopyFileName.42 = STRING: sbs-tech-switch.07_09_14
    CISCO-CONFIG-COPY-MIB::ccCopyUserName.42 = STRING: XXXX
    CISCO-CONFIG-COPY-MIB::ccCopyUserPassword.42 = STRING: XXXX
    CISCO-CONFIG-COPY-MIB::ccCopyNotificationOnCompletion.42 = INTEGER: false(2)
    CISCO-CONFIG-COPY-MIB::ccCopyState.42 = INTEGER: successful(3)
    CISCO-CONFIG-COPY-MIB::ccCopyTimeStarted.42 = Timeticks: (52270199) 6 days, 1:11:41.99
    CISCO-CONFIG-COPY-MIB::ccCopyTimeCompleted.42 = Timeticks: (52270339) 6 days, 1:11:43.39
    CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: active(1)
    CISCO-CONFIG-COPY-MIB::ccCopyServerAddressType.42 = INTEGER: ipv4(1)
    CISCO-CONFIG-COPY-MIB::ccCopyServerAddressRev1.42 = STRING: "10.10.10.193"
    After the successful copy completes the entry will exist for five minutes allowing for no further requests to be made with that particular random number. To send another request prior to the five minute clearing of the table send a "destroy" snmpset to clear the entry.
    [root@localhost hlse]# snmpset sbs-tech-switch CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 i 6 2>/dev/null
    CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: destroy(6)
    Hope this will save some time for those looking to implement a more secure snmp config copy setup.
    V/R
    Cody Hartley

  • How to insert image into table and to in Oracle 9i intermedia?

    Mr Lawrence,
    I want to ask something:
    I use Oracle 9i intermedia
    If i use this script:
    CREATE TABLE images (
    file_name VARCHAR2(100) NOT NULL,
    image ORDSYS.OrdImage
    then
    CREATE OR REPLACE DIRECTORY imgdir AS 'd:/data';
    then
    INSERT INTO images (file_name, image)
    VALUES ('tree', ORDSYS.ORDImage.init('file','imgdir','tree.jpg' ));
    I put tree.jpg in directory d:/data in my hard drive.
    Is my tree.jpg file had already get in to my images table?
    I'm little confuse, because when i check my table with this script:
    select file_name, i.image.getWidth() from images i;
    it's show that my i.image.getWidth() for file_name tree is empty.. that mean my tree.jpg doesn't get in to my table.. am i correct?
    N also i want to ask how to display to screen all of my image from images table?
    Is it posible Oracle 9i intermedia to support display image from table?
    How?
    thanks Mr Lawrence

    -- First step would be to create a directory in oracle and map it to the folder where your image resides.
    create directory image_dir as *'c:\image_dir';*
    Then you would have to use a procedure to insert the image in your table. SO first create a table to hold the image. Note that you have to use a BLOB to insert the image.
    CREATE TABLE test_image
    ID NUMBER,
    image_filename VARCHAR2(50),
    image BLOB
    Now let's write the procedure to insert the image in the table above.
    CREATE OR REPLACE PROCEDURE insert_image_file (p_id NUMBER, p_image_name IN VARCHAR2)
    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := BFILENAME ('image_DIR', p_image_name);
    -- insert a NULL record to lock
    INSERT INTO temp_image
    (ID, image_name, image
    VALUES (p_id, p_image_name, EMPTY_BLOB ()
    RETURNING image
    INTO dst_file;
    -- lock record
    SELECT image
    INTO dst_file
    FROM temp_image
    WHERE ID = p_id AND image_name = p_image_name
    FOR UPDATE;
    -- open the file
    DBMS_LOB.fileopen (src_file, DBMS_LOB.file_readonly);
    -- determine length
    lgh_file := DBMS_LOB.getlength (src_file);
    -- read the file
    DBMS_LOB.loadfromfile (dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE temp_image
    SET image = dst_file
    WHERE ID = p_id AND image_name = p_image_name;
    -- close file
    DBMS_LOB.fileclose (src_file);
    END insert_image_file;
    Now execute the procedure to insert the image.
    EXECUTE insert_image_file(1,'test_image.jpg');
    Thanks,
    Aparna

  • How do I import a jpeg image into my mail signature so that it wont separate when it gets to the receiving email

    How do I import a jpg image into my mail signature box so that it wont separate into an attachment when it gets to the receiving mail box.  We have a company logo and when I send it to someone it does not show up under our address but rather as an attachment.  How do I keep this from happening?

    Hello
    be sure to send your email into HTML format end be sure your corespondant read mail as HTML format
    as you can not be sure of your coresspondant email setting , you can not be sure as your mail is read
    Pierre

  • Inserting Image into a BLOB column in Oracle9i

    Hi,
    I am unable to insert image into a BLOB column. I am using Forms 6i REL 2 and Oracle 9i. But I could do it on Oracle 8i with same Forms version.
    Same thing is true for CLOB in 9i.
    Would you please try with this code?
    TABLE
    Create table x
    (Id number,
    Name CLOB,
    Pict BLOB);
    WHEN-BUTTON-PRESSED trigge
    declare
         x varchar2(265);
    begin
         x := get_file_name;
         read_image_file (x, 'GIF', 'picture.pict');
    end;
    Take care,
    Tarek

    Forms 9i and Oracle 9i work fine together for this case.

  • Proceedure to copy the standard BAPI into ZBAPI

    Hi Gurus..
       I found the standard BAPI and I want to copy the standard BAPI into ZBAPI(for my company purpose) and use it in SAP xMII.
      Please give the steps for copying.
    Thanks
    R M

    Hi,
    To copy the standard BAPI into ZBAPI.
    check this link:
    how to copy BAPI
    How to Copy standard BAPI to ZBAPI....
    Regards
    Adil

  • Downloaded jpg pictures - can't paste cut images into jpg's

    I've downloaded some low resolution jpg's from the Web and intended to do some image cuts from photos I took - and to paste those cut images into the low res downloaded pictures.  Using Elements 9, I can cut and paste from photo to photo if they are pcitures I took on my camera just find - just can't seem to cut and paste into the downloaded low res images.  Cutting from a self took photo and pasting into the low res jpg does create a layer, but it shows up blank.  I even took one the jpg's I downlaoded from the Web and scanned it so it might take off any protection that may be comng down with the downloaded jpg.  Nothing seems to work.  Thoughts?

    Try opening a blank canvas in Editor
    File à New à Blank File
    Set your dimensions and background e.g. white or back
    Set resolution for print or web.
    Drag your images up from the project bin on to the canvas.

  • Store image into db

    I am using sql server db. I would like to store image into
    db. How can i store image into db and read it after that.
    thanks

    Unless there is a compelling reason for storing the image in
    the database, I'd suggest you store the image in an image directory
    and store the filename of the image in the database. For example,
    if you store myImage.jpg into a directory named imageDir, you can
    store the filename "myImage.jpg" in the database. To display the
    image, retrieve it as the variable showImage and display it using
    <IMG SRC="imageDir\#showImage#" ... >

  • Images into Podcast

    Hello all-
    Is it possible to generate a series of images into a Podcast where the user drives the image flow? For example, let's say that I have 10 jpegs or PDFs or whatever works best. I'd like to allow someone to download onto iPod and choose when to move from the first image to the second (go back, continue forward, etc.). Is that possible and if so, can anyone steer me in the right direction?
    Thanks,
    Dave

    In this case, audio is not a requirement.
    if you just want images on request, then a web page slide show would do the job, though it couldn't be distributed in the iTunes Store as a podcast.
    So, are you saying that I could accomplish what I need to by making each image into its own chapter? Will that image stay on the screen until the user moves chapter forward or chapter backward?
    Yes: an audio file with several chapters, each with its image, will show the image applicable to the chapter in which the playhead is currently placed, whether paused or scrolling,

  • Still images into a project

    Hello.
    I am working on an SD NTSC-Anamorphic project and want to bring some still images into the project. The images were shot with a Canon 350D (Rebel XT) in Raw format and currently are in TIFF format as converted by Aperture. When I import the images I am finding a noticable degredation in quality when comparing the images in "Preview" to the Viewer to the Canvas. Once the images are in the timeline and I look at them on the canvas they look alot fuzzier.
    Should I be using a different file format? Is there a setting I've overlooked somewhere?
    Thanks for any and all suggestions...

    Hi,
    I have read the comments above and all are valid but they do not look to me to answer your core question.
    I had been asking the same question on forums for a long time and had similar responses and finally fixed the issue by purchasing a Photoshop book called WOW.
    One of the earlier comments really hits the nail on the head but does not seem to offer the fix (I'm not trying to be critical here because all information does help).
    First of all you need to reduce the size of the file for video - this is, in my experience best done in Photoshop not FCP (Photoshop WOW book comes with DVD and automatic actions to do this).
    I call this the 'resize' step and put all my photos through this stage first (it does help to have an action for landscape and one for portrait to ensure that they are kept separate for the next step).
    Then you need to 'rescale' the image to the size of your project in FCP (I assume that you are using widescreen as I do). To do this you need to create a blank document in widescreen format and then drop or drag your resized photo into the widescreen format and it will take on the same format as the blank widescreen document. Get rid of any layers and save the document in TIFF or JPEG it is up to you - you can keep the layers if you want to but you need to be aware of the issues of layers being imported into FCP.
    I felt like I had found my fountain of youth when I sorted this out properly (the stress was definitely make me age).
    Some comments suggest that the latest FCP does a better job of compressing the photos than the older versions but I wouldn't know as I use FCP 4.5HD and this may be so. However, it is commonly accepted, I believe, that formating the photo in photoshop is the better option.
    It fixed all my headaches at least because I wanted the flexibility of FCP with photos just as you do.
    Good luck and no intention to dislocate any noses out there, the willingness of people helping to provide assistance out there is fantastic.
    Lee

  • Putting an image into a JFrame or a JPanel

    Hello everybody,
    I'd like to know how to put an image (a real one, not a small icon we can't see it!) into a JFrame, or a JPanel, or included into a miscellanea element (label, textfield or somethiong else).
    Thanks,
    Regards
    Cedric

    Hi Cedric,
    If the image format is Jpg or gif, then the best way to insert the image
    into the Frame or panel is to use JLabel. You can pass the argument to the file as parameter to JLabel construction.
    For other formats, you have the option of using drawimage in paint function of applets.
    Hope this helps.
    Best Regards,
    Chandru

  • Import an image into a document

    I see this asked on other posts but I don't see an answer so I'm going to ask again...
    I'm using Designer 7.0, windows XP pro on a Dell D600 laptop with 1 gig of RAM.
    I want to import an image into a docement and the image doesn't appear to be supported. I've tried jpg and tif. Some images will work and others won't. Is there a solution for this?
    Thanks

    Irv,
    Thanks for the reply. The images that didn't work were CMYK. When I converted to RGB they worked.
    The images that didn't work were coming up with random grey scale colors.
    Thanks again,
    Kurt

Maybe you are looking for

  • Fields in ALV that is showing FM REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hello: I have problems with ALV that FM ALV FM <b>REUSE_ALV_HIERSEQ_LIST_DISPLAY </b>is showing. Problem 1: I have got a input field (fieldcat-input = 'X') but when this field is modified in ALV (in screen) it is not modified in internal table!. Prob

  • "Send Form Again?" Problem

    When sending a "reply" to an online forum thread using Safari 3.1, frequently I am halfway through the reply and need to add a live link. When I go to another URL, copy the link, and try to return to my reply, I get the "Do you really want to send th

  • Video Effects Die Out

    Hey, Near the end of a video I'm making, the video effects I'm using just gradually stop. I'm using Edge Work and Flase Color, the video is 1:47 long, and the effects start dieing at 1:36 or so. Does anybody know why? Thanks!

  • Connection Error (error message)

    Hi guys,  i've been having this issue where everytime I connect my phone to zune, it would display this error message: Connection Error. We can't create a connection from your phone to the interent. You can still sync content between your computer an

  • Inbox email has no content

    So