How do I define Embedded image in FLT XML?

Hi,
Let's say I have embedded an image like this:
package
    public final class Resource
        [Embed (source="/assets/images/1.gif" )]
        public static const image_1:Class;
How would I call this from FLT XML for the source to be correctly mapped to my image?
<TextFlow xmlns="http://ns.adobe.com/textLayout/2008">
   <p>
       <img source="  ??  "/>
   </p>
</TextFlow>
Thanks in advance!

There is no built in way to do that.  It can, however, be done in several ways.
One way is to supply a custom Configuration to the importer that converts the XML to a TextFlow.  That configuration would include an inlineGraphicResolver function that would convert your markup to a DisplayObject.
Another possibility would be to simply walk the markup after the import and modify the source of the various ILG objects.
I'm kind of wondering though - can you new "StringNameOfClass"?
The class and DisplayObject source specifications for ILGs are there mostly because it works.  They do have limitations with cut/copy/paste.  Class works within a SWF but not to an external swf.  There is no way in Flash to "clone" a generic DisplayObject.
Hope that helps,
Richard

Similar Messages

  • How to convert an embedded image to a bytearray

    I have an image like this
    [Embed(source="images/open_position.PNG")]
    public var OpenImage:Class;
    How can I convert this to a ByteArray?

    Hi,
    Your OpenImage class is a subclass of BitmapAsset, then you can retrieve the ByteArray by an instance of OpenImage. Here is the draft code (not tested):
    public function getByteArray( InputClass:Class ):ByteArray {
         var instance:BitmapAsset = BitmapAsset( new InputClass() );
         return instance.bitmapData.getPixels();

  • Rendering of embedded images

    <p>We are creating reports out of MS SQL. They contain besides tables and charts images that are showing maps. These images are created in MapInfo, saved to jpg and stored as BLOB in the database. On the maps are the results of cellular drive tests along routes. For each network operator we have one map. Before placing them into the DB they are all looking same (no tint).</p><p> <img src="http://portal.lws-cna.com/temp/sample1.jpg" alt=" " title="sample1 http://portal.lws-cna.com/temp/sample1.jpg" width="400" height="257" /><br /><a href="http://portal.lws-cna.com/temp/sample1.jpg">http://portal.lws-cna.com/temp/sample1.jpg</a></p><p><img src="http://portal.lws-cna.com/temp/sample3.jpg" alt=" " title="sample 3 http://portal.lws-cna.com/temp/sample3.jpg" width="400" height="257" /><br /><a href="http://portal.lws-cna.com/temp/sample3.jpg">http://portal.lws-cna.com/temp/sample3.jpg</a></p><p>As you can see the maps are showing the same area but different results. When I include them into the report they are tinted. I could reproduce this in an image processing tool by decreasing the color depth using different methods.</p><p>I wanted to understand how the rendering of embedded images works. Are there settings/measures to influence the rendering behavior?</p><p>Thanks, Joerg</p>

    Please re-post if this is still an issue and search forums first.

  • How can I programatically identify PDF files with embedded images?

    Our company has 27,266,949 .PDF files that we're planning to compress in order to save server space.
    We don't want to compress any of the .PDF files that have embedded images as to not alter the image's state.
    How can we programatically create a list to exclude from the compression process?

    Ah, see told you we were new to this and no, my taxs already have enough digits to the balance.
    Ok, so based on that, we should be able to use the preflighting tool to identify the PDF’s with images, factor them out, and then continue with lossless compression on the remaining balance.
    That will give us the compression we need to save space, but also allow us to stand in the court of law (if the scenario was to ever occur) and proclaim that none of our medical images have ever been altered by compression.
    Sound like a reasonable plan?

  • I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to sen

    I have Windows 7, Microsoft Outlook and PSE 13. I have used the "Share photos as embedded images" feature frequently, but today when I went to use it, it wasn't there, only the option to send email with files attached. How do I get back the ability to send emails with photos embedded. I like adding the frames and backgrounds and I think it's easier for recipients to look at the photos. Thanks for any suggestions of things to try.
    Gail

    I had a similar problem in that my wife's iphone 5 could not send pics with imessage.  Had to set the settings to default to SMS or whatever.  After laboring many hours on the web I coincidentally was on the phone with the internet people to question my internet speed.  They changed the router channel, which is something that I am capable of doing myself.  After that, the pics go over imessage.  My own Iphone didn't have the problem.  We are both latest IOS 7.0.6.

  • How do I hide the file names/path names of embedded images in a PDF document?

    I created a PDF document from a Word document, and the problem is that the PDF document shows the file names and path names for all of the embedded images in the PDF document. I don't want that information displayed. I don't want to send the PDF out to clients and have them read the names I've assigned to those images, plus it looks messy. And I've lost many of the original image files so they only exist in the Word document, thus I can't go back and rename them. I searched the internet for an answer but I couldn't find one anywhere.

    When you create a tagged (accessible) PDF file from Word, placed bitmap images will use their filename as the "ALT text" if you don't define something else for the text to say, because an image without any ALT text is a failure against the accessibility standards. You can't change that default action, so you should put your own meaningful text into the ALT field for each image - which is what you should be doing anyway if the PDF is standards-compliant.
    You can can set the text in Word, but it depends on your version as to where the dialogs are - Google for it - or you can change/delete it in Acrobat using the tags navigation pane on the left side of the window (right-click the sidebar if it's not visible). Drill down through the tags structure to find the "<Figure>" tag you want to change, right-click and choose Properties, then put something in the "Alternative text" field. This process isn't something you can easily automate, but if you don't need tags at all, you can save without tags (or print to PDF).

  • How to request - Updating an embedded image in a PDF using Actions but not all actions are recorded

    i am trying to create an Action in CS3 but some of my actions are not been recorded.
    What i want to do is run the Batch option on a folder with a 1,000 PDFs in it. The PDFs
    (which were created in Illustrator CS3) consist of a single page with a single embedded
    image at the foot of the page. I am trying to update that embedded image.
    The Actions i am trying to record are...
    1) Select the single image in the Links palette.
    2) Choose the "Relink.." option in the drop down menu of the Links palette.
    3) Navigate to the new image and select "Place".
    4) Save and close document.
    But the first two actions are not been recorded.
    How do i get around this problem ?
    Note: From trying this manually the new image seems to take on the horizontal and
    vertical scaling of the previous image which is what i want. But if i am going to have to
    do a script then that is a factor that may have to be incorporated into the script.
    Any help appreciated.

    Give this a trial… It does a save as which is much safer than overwriting… At least you still have your originals should I get something wrong…? I did test but only with 3 files…
    #target illustrator
    function replaceImage() {
              var i, doc, fileList, inFolder, outFolder, opts, pic, rep, rip, saveFile, uIL;
              inFolder = Folder.selectDialog( 'Please choose your Folder of AI PDFs…' );
              outFolder = Folder.selectDialog( 'Please choose a Folder to save AI PDFs in…' );
              pic = File.openDialog( 'Please choose your replacement Image…' );
              if ( inFolder != null && outFolder  != null && pic != null ) {
                        fileList = inFolder.getFiles( /\.pdf$/i );
                        if ( fileList.length > 0 ) {
                                  uIL = app.userInteractionLevel;
                                  app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
                                  for ( i = 0; i < fileList.length; i++ ) {
                                            doc = app.open( fileList[i] );
                                            rip = doc.rasterItems[0].position;
                                            rep = doc.placedItems.add();
                                            rep.file = pic;
                                            rep.move( doc.rasterItems[0], ElementPlacement.PLACEBEFORE )
                                            rep.position = rip;
                                            rep.resize( 31.414, 31.414, true, true, true, true, 100, Transformation.TOPLEFT );
                                            doc.rasterItems[0].remove();
                                            rep.embed();
                                            opts = new PDFSaveOptions();
                                            opts.pDFPreset = '[Illustrator Default]';
                                            saveFile = File( outFolder + '/' + doc.name );
                                            doc.saveAs( saveFile, opts );
                                            doc.close( SaveOptions.DONOTSAVECHANGES );
                                  app.userInteractionLevel = uIL;
                        } else {
                                  alert( 'This Folder contained NO Illustrator PDF files?' );
    replaceImage();

  • How the data is embedded in the image

    please explain this code clearly !!! how the file is embedded inside the image and retrieved back !!!
     Private Sub btn4(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NLabel4.Click
            Using O As New OpenFileDialog With {.Filter = "(Image Files)|*.jpg;*.png;*.bmp;*.gif;*.ico|Jpg, | *.jpg|Png, | *.png|Bmp, | *.bmp|Gif, | *.gif|Ico | *.ico", .Multiselect = False, .Title = "Select image"}
                If O.ShowDialog = 1 Then
                    Try
                        Using FS As New IO.FileStream(O.FileName, IO.FileMode.Open)
                            FS.Seek(0, IO.SeekOrigin.End)
                            While Not FS.ReadByte = Asc("|")
                                FS.Position -= 2
                            End While
                            Dim s As String = Nothing
                            While Not FS.Position = FS.Length - 4
                                s &= Chr(FS.ReadByte.ToString)
                            End While
                            Dim Ext As String = Nothing
                            FS.Seek(0, IO.SeekOrigin.End)
                            While Not FS.ReadByte = Asc("*")
                                FS.Position -= 2
                            End While
                            While Not FS.Position = FS.Length
                                Ext &= Chr(FS.ReadByte.ToString)
                            End While
                            FS.Seek(FS.Length - ((s.Length + s) + 5), IO.SeekOrigin.Begin)
                            Using sfd As New SaveFileDialog With {.DefaultExt = Ext, .Filter = "*." & Ext & " | *." & Ext}
                                If sfd.ShowDialog = 1 Then
                                    Using FSw As New IO.FileStream(sfd.FileName, IO.FileMode.Create)
                                        While Not FS.Position = FS.Length - (s.Length + 5)
                                            FSw.WriteByte(FS.ReadByte)
                                        End While
                                    End Using
                                End If
                            End Using
                        End Using
                    Catch ex As Exception
                        MessageBox.Show("There was an error!" & vbNewLine & vbNewLine & "The application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                        Me.Close()
                    End Try
                End If
            End Using
        End Sub
        Private Sub btn3(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NLabel3.Click
            Dim ext As String = TextBox1.Text.Substring(TextBox1.Text.LastIndexOf(".") + 1)
            Using SFD As New SaveFileDialog With {.DefaultExt = ext, .Filter = "*." & ext & " | *." & ext}
                If SFD.ShowDialog = 1 Then
                    Try
                        Dim ImageBytes() As Byte = IO.File.ReadAllBytes(TextBox1.Text)
                        Dim FileBytes() As Byte = IO.File.ReadAllBytes(TextBox2.Text)
                        Dim FS As New IO.FileStream(SFD.FileName, IO.FileMode.CreateNew)
                        FS.Write(ImageBytes, 0, ImageBytes.Length)
                        FS.Write(FileBytes, 0, FileBytes.Length)
                        FS.WriteByte(Asc("|"))
                        Dim FileSize() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(New IO.FileInfo(TextBox2.Text).Length)
                        FS.Write(FileSize, 0, FileSize.Length)
                        FS.WriteByte(Asc("*"))
                        Dim Extention() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(TextBox2.Text.Substring(TextBox2.Text.LastIndexOf(".") + 1))
                        FS.Write(Extention, 0, Extention.Length)
                        FS.Close()
                        FS.Dispose()
                        MsgBox("Done")
                    Catch ex As Exception
                        MessageBox.Show("There was an error!" & vbNewLine & vbNewLine & "The application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                        Me.Close()
                    End Try
                End If
            End Using
        End Sub

    1. the new file which we are creating will be in this order or not 
    file_extension * data_file_size | data_file image_file
    No.  The file will be in the order in which it is written in the writing routine:
    1. Image File
    2. Data File
    3. "|"
    4. Data File Size (ASCII)
    5. "*"
    6. File Extension (ASCII)
    2. explain this snippet .. why we are changing position while we are extract file
     While Not FS.ReadByte = Asc("|")
                                FS.Position -= 2
                            End While
                            Dim s As String = Nothing
                            While Not FS.Position = FS.Length - 4
                                s &= Chr(FS.ReadByte.ToString)
                            End While
                            Dim Ext As String = Nothing
                            FS.Seek(0, IO.SeekOrigin.End)
                            While Not FS.ReadByte = Asc("*")
                                FS.Position -= 2
                            End While
                            While Not FS.Position = FS.Length
                                Ext &= Chr(FS.ReadByte.ToString)
                            End While
                            FS.Seek(FS.Length - ((s.Length + s) + 5), IO.SeekOrigin.Begin)
    The file read position is recalculated before each read, depending either on the position of the marker ("|" and "*") or on the length of the data.   That's how each portion is extracted - the position is set to the start of the portion, and that
    portion is read for the correct number of bytes.  The portions are extracted from the end back towards the beginning because the markers can only be guaranteed as unique (they are illegal in a filename extension) when searching backwards.
    3. after combining the files with the image .. how the created image is visible (even we are not using any algorithm)
    That depends on the image file format, but most formats will use header information that describes the location within the file of the various bits of data that are needed to create the image.  The side effect of this is that if there is information
    in the file that is not referenced from this header data then it is simply ignored.  That's what this procedure is relying on - because the new data is appended to the end of the file it will not be referenced from the header data and will be ignored.
    For a complete description of what this code does and why it works you should refer to the original author.

  • How to stream MP3s with embedded images

    When I stream an MP3 file with an embedded image, the first few seconds of the files are clipped.
    I will need to find another server, or a viable workaround.
    What is the best way to work around this?

    I have the same issue described by loris.guignard.
    The problem is not specific to the embedded cover. If I store very large text tags in mp3 (i.e. larger than about 130 kB), the same problems occurs. In addition, if the tags exceed the 130 kB limit, the duration of the song which can be played decreases.
    For my tests I use a 3:26 mp3 (8.25 mB) and the JW Player. The duration of the song piece which can be played varies as follows, depending on the size of the picture stored in the tags :
    - Picture size between 130 kB and approx. 600 kB => the song is played properly until 3:23. The last 3 seconds played (3:20 -> 3:23) are repeated from 3:23 until the end at 3:26. Note that the total duration of the song is correct (3:26).
    - Picture size : 750 kB => the song is played properly until 3:23, then it stops (the total time displayed is 3:26)
    - Picture size : 1.244 MB => same as above, but stops at 3:10 / 3:26
    - Picture size : 1.493 MB => same as above, but stops at 3:03 / 3:26
    - Picture size : 2.348 MB => same as above, but stops at 2:43 / 3:26
    - Picture size : 6.297 MB => same as above, but stops at 0:58 / 3:26
    The tags are ID3v2.3 compliant (by the way ID3v2.3 has no size limitation). The measures are the same when we use ID3v2.4 standard. It seems that the problem lies only in the size tags, not in the ID3 version or the tag content.
    The measurements are the same whatever the buffer length I choose for the client-side player.
    Let me make the following assumption: the end of the played song is evaluated according to offset from the beginning of the mp3 file (rather than from the start of the mp3 music data, i.e. from the end of the tags), modulo the buffer size used for reading the file (which must be 128 kB).
    For example, if we combine a tag picture of 4 MB and a mp3 of 8 MB, we have a 12 MB mp3. Since the tags are stored at the file beginning, when the server-side player reaches the middle of the song (at 4+4 = 8 MB), the reader believes that the reading is complete. But it remains 4 MB to read before the real end.
    Maybe the last seconds can loop or be truncated because of the wrong time adjustment between song duration evaluation and data buffer length. In my example, the mp3 bitrate was 40 kB/s. So if the file buffer size is 128 kB, it read... 3.20 seconds.
    Of course it is only a hypothesis, but I'm really intrigued by this problem.
    Can you please tell we how can we fix this ? Are there any configuration that we can change in the FMS side or maybe a patch ?

  • How To: Using Embedded Images for Drawing Fills

    I had some challenges making this seemingly simple feature work, so as I found no examples, I made an example on how to do this.  The key I found was using the “BitmapAsset” class which is compatible with posting our embedded image into BitmapData objects. That put things together.
    See the full narrative at:  http://digitalshowcase.biz/wordpress/?p=234
    Download the Flex Project here:  http://digitalshowcase.biz/flex/FillsWithEmbeddedImages.zip
    - Alan Gruskoff, Digital Showcase LLC

    >>says that this export technique does not work, it produces a low res screen version of the file.
    Are you certain the original files were any better?
    My preferred method of doing this works well, but it takes a few extra steps. I'd make a high-res PDF out of the PM file, then pick apart the PDF to extract the graphics. Are the graphics raster or vector? If they're raster, you can use Acrobat's Touch-up Object tool to open them in Photoshop. If they're vector, you can open the PDF in Illustrator and save out the graphics from there.
    HTH

  • How to insert embedded image into TextArea htmlText (and add IOErrorEvent.IO_ERROR listener).

    I unsuccessfully tried to find way to insert embedded image into TextArea via <img> tag. Can you point me out how to do this?
    Also, please, tell me how to handle IOErrorEvent from TextArea because adding IOErrorEvent.IO_ERROR listener to TextArea doesn't cause any effect when image url of img tag has not been found.
    Thanks

    i 've successfully inserted the image into the database... here is my code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package PMS;
    import java.io.File;
    import java.io.FileInputStream;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    public class Browse_java
    static Connection con=null;
    public static void main(String args[])
    try{
    System.out.println("(browse.java) just entered in to the class");
    con = new PMS.DbConnection().getConnection();
    System.out.println("(browse.java) connection string is"+con);
    PreparedStatement ps = con.prepareStatement("INSERT INTO img_exp VALUES(?,?)");
    System.out.println("(browse.java) prepare statement object is"+ps);
    File file =new File("C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    FileInputStream fs = new FileInputStream(file);
    byte blob[]=new byte[(byte)file.length()];
    fs.read(blob);
    ps.setString(1,"C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    ps.setBytes(2, blob);
    System.out.println("(browse.java)length of picture is"+fs.available());
    int i = ps.executeUpdate();
    System.out.println("image inserted successfully"+i);
    catch(Exception e)
    e.printStackTrace();
    finally
    try {
    con.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    }

  • How to make a PDF embedded image append a report and send via fax electronically from MS SSRS 2012?

    How can I make a PDF embedded image append a SSRS 2012 report and send via fax all electronically?  Is this possible?
    Thanks in advance for your time!

    Hello,
    1. The report item Image can be used to display the image which  embedded in the report, stored in a database, stored on the report server, or stored elsewhere on the Web.
    For example, you can embedded the PDF image in the report and stored as text in the report definition.
    2.Reporting Services includes an e-mail delivery extension and a file share delivery extension which you can send report to user or group through e-mail or send the report to a shared location on your network.
    If you want to send the report to FAX, you may try to create a custom delivery extension depend on your faxing software.
    Reference:Implementing a Delivery Extension
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • How to find out embedded raster image is Black&White or Color image?

    Is there any possibility to find out the embedded raster image is Black&White, Gray image (or) Color image in "illustrator cs3" without using color mode shown in "document info" pannel. Kindly advice me, the possibilities and solution. And also any scripts avilable for this?
    Thanks.

    Or you could select the embedded image, and open the Window>Document Info panel. Select Embedded Images from the fly out menu on the Document Info panel. This should give you the color mode and more info on the embedded file in question.

  • How to display embedded image & text in content presenter web template

    We have a requirement to display both text and embedded image together like in WYSIWYG editor in Webcenter spaces. The content has to be dynamic and is context sensitive so that users in the same role can edit and publish the content. The users who are in different role would see different piece of content.
    To achieve this use case, i think Content Presenter enabled with Site studio is the best choice. I have created element and region definitions with WYSIWYG and region templates in site studio. Created contributor data file in UCM. Content Presenter in webcenter is configured with that region definition and the region template etc.
    At design time, the contributor data file is edited and some image / text is added in WYSIWYG editor.. But however at runtime view, i could see only the text added in WYSIWYG editor and the file name of the image embedded....Any one successfully used Content Presenter with Site studio???
    Regards
    Prasath.C

    Hi
    I'm using the site studio tags in jdev. My code is the following one and I have the same result I see the the html tags instead a formatted text.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:dt="http://xmlns.oracle.com/webcenter/content/templates"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:trh="http://myfaces.apache.org/trinidad/html">
    <dt:contentTemplateDef var="node">
    <af:panelGroupLayout layout="vertical" id="pgl3">
    <af:panelGroupLayout layout="horizontal" valign="top" inlineStyle="background-color:#FFF; padding:10px;" id="pgl4">
    <af:spacer width="10px;" id="s1" inlineStyle="background-color:#DDD; color:white;"/>
    <af:panelGroupLayout layout="vertical" id="pgl1" valign="top">
    <af:outputText value="#{node.propertyMap['RD_RICH_TEXT:text1'].asTextHtml}"
    id="ot2" styleClass="bodytext"/>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </af:panelGroupLayout>
    </dt:contentTemplateDef>
    </jsp:root>

  • How to use embedded image in TextArea in Air (differs from Flex) ?

    So I was trying the example from the LiveDocs:
    Making hyperlinks out of embedded images
    http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
    This doesn't seem to work in an Air application (the image doesn't show).
    Even simply adding an image with a relative path doesn't work in Air (the image doesn't show either):
        <mx:Image source="../assets/butterfly.gif" />
    I'm sure I must be missing something really straightforward here, can anyone help ?
    Also, more generally, where I can see the source code of TextArea and RichTextEditor, understanding their inner working would be a great help.
    Thanks

    Embedding images in htmlText in a TextFiled isn't supported in AIR.
    See: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.ht ml#htmlText
    The source for the Flex components is included in the Flex SDK.

Maybe you are looking for

  • Not able to print preview or print Smartform after the changes

    Hi Experts, I made a small change to the smartform, saved it and activated it. Transport it to our QAS system for testing. But while trying to print preview the form i am not able to see any print/print preview. After my debug in the report that call

  • Validation on a Datagrid Column

    Hi, I have a Datagrid with three columns, out of which two columns are editable. I want to apply string validator on one of the editable column. How can I do this?

  • Masking the data in the Table

    Hi, Please help me in masking the data in few of the Oracle Apps base table columns data. Example : I want to print xxxxxx for the Birth Date column from the per_all_people_f table If I query from the TOAD. From Application using Form Personalization

  • Order Value - Credit Check

    Dear Experts Is there a way to avoid open order value to be calculated in the credit exposure during credit check.? we want to activate credit checks at the delivery level. and we want only the delivery value + invoice value+ payments to be incorpora

  • ITunes app redirection to review in app store

    Anyone else having a problem with iTunes redirecting you to a submit a review screen in the app store? Went ahead and submitted a review, but no luck. Did a hard reset and still no luck. By the comments on the review page, it appears I am not the onl