Bitmapdata.draw and stage3D

I have a script that uses a lot of complicated .draw calls with matrix transformation (scale and shift), displaying different parts of a big image (thousands by thousands px) in a kind of navigatior window.
Currently it's done in "old" AS3 for FP10. Is there a way to speed these calls up using GPU and stage3D in the new player FP11?
Can GPU help with that kind of image manupulation?

Good news, thank you!
Can anyone tell me what could be a Stage3D equivalent of this:
var img:BitmapData = .......
var rgn:Rectangle = ........
var scl:Number = ....
var matrix:Matrix = new flash.geom.Matrix();
rgn.x *= scl;
rgn.y *= scl;
rgn.width *= scl;
rgn.height *= scl;
matrix.scale(scl,scl);
matrix.tx = -rgn.left;
matrix.ty = -rgn.top;
var mapBD:BitmapData = new BitmapData(rgn.width,rgn.height,false,0x000000);
mapBD.draw(img,matrix,null,null,new Rectangle(0,0,rgn.width,rgn.height),true);
var mapLayer:Bitmap = new Bitmap(mapBD);

Similar Messages

  • BitmapData.draw() and embedded MovieClip

    I can't capture the content of an embedded MovieClip, the
    following code creates a Bitmap that shows only the results of the
    changes methods of Graphics, although the clip is correctly
    embedded. Have you tackled similar problems? Thanks.
    [Embed(source="aMovieClip.swf")]
    private static var AMovieClip:Class;
    var aMovieClip:MovieClip = new AMovieClip();
    aMovieClip.graphics.lineStyle(6, 0xff0000);
    aMovieClip.graphics.lineTo(100,100); //i don't need this, but
    this is the only things that you will see, a red line
    var bitmapData:BitmapData = new BitmapData(aMovieClip.width,
    aMovieClip.height,true, 0xFFFFFF);
    bitmapData.draw(aMovieClip);

    It seems that the functions that were failing were
    getBounds() and accessing the transform.concatenatedMatrix in the
    loaded swf in the process of preparing to draw the bitmap.

  • BitmapData.draw() and displayobject with 3D transformations

    Hi all,
    I have a sprite with some objects in it which are transformed in 3D (positioned and rotated). The objects form a coneshape in such a way that the objects that make up the back are hidden.
    When I use that sprite as a source for the bitmapData.draw() it is drawn from another viewpoint so it seems. In my case the copy is viewed slightly from the bottom and right.
    Bottomline:
    Does anyone know of a way to duplicate the image of a sprite which contains 3D manipulated graphics?
    thanks in advance,
    Manno

    Nevermind:
    var pp:PerspectiveProjection = new PerspectiveProjection();
    pp.projectionCenter = new Point( 0, 0 );
    sphere.transform.perspectiveProjection = pp;
    Where sphere is the object to use as a source in the draw method. It seems OK now it has it's own perspectiveProjection set.

  • BitmapData.draw() and Security

    I am dynamically creating screen captures from flv files
    located in separate sub domains through the Bitmap Data Draw
    method. The problem is the illusion that flash calls security.
    "When you call the BitmapData.draw() method with progressive
    video as the source parameter, the caller of BitmapData.draw() must
    either be from the same sandbox as the FLV file, or the server of
    the FLV file must have a policy file that grants permission to the
    domain of the calling SWF file. You can request that the policy
    file be downloaded by setting the checkPolicyFile property of the
    NetStream object to true."
    Here is my first question. This seems to only apply to
    "progressive video". Is this yet another attempt to make us buy
    stream servers?
    And now my second question.
    Why is it that an end user can tap the flv files and draw
    freely as long as the embed object code references a cached version
    of the swf file but the remote swf file hosted on a separate sub
    domain in the same network needs to download a copy of the "policy
    file"?

    Could you try this - Open and swf, rightClick - Goto
    settings, then click Advanced. On the webPage click on "Global
    Security settings panel".
    If you don't find your local directory in there, add it and
    see if things work?
    If not, it would be good if you could post the chunk of code
    which is creating problems.

  • BitmapData.draw and clipRect

    Hello,
    I'm writing a sprite animation system that requires
    transformations on individual sprites that are stored as BitmapData
    sprite sheets.
    I've been using BitmapData.draw to do my work - which has
    worked well for individual bitmap files, but when it comes to
    transforming only a piece of a bitmap, which is what clipRect is
    supposed to do according to the documentation, it doesn't work.
    It looks like clipRect is actually the clipping region for
    the destination not the source. I'm wondering there's any function
    that does source clipping before transform to destination.
    Otherwise, I fear I'm going to have to use an intermediate
    bitmapData to copy my frame of the sprite to before I transform it.
    Regards!

    Nope, you just have to do it in 2 steps it looks like.

  • Still cannot use BitmapData.draw from RTMP sources?

    I have been trying all different ways to capture RTMP streams from my local FMS3.5 server but no luck... then I read this:
    "For media loaded from RTMP sources, you cannot use the BitmapData.draw() and SoundMixer.computeSpectrum() methods to extract run-time graphics and sound data. "
    is this still true? If so, is there any way around this?
    Thx!

    You will get a better luck if you post this question on media server forum:
    http://forums.adobe.com/community/adobe_media_server?view=discussions

  • HTTP Streaming and BitmapData.draw

    Hi OSMF Experts,
    I've tried to duplicate segments of a Video with BitmapData.draw.
    It's working with RTMP (set videoSampleAccess server side).
    Progressive is also working (crossdomain.xml is ok).
    BitmapData.draw doesn't work with HTTP Streaming! (Using *.f4m). What's the way to get this working? Following Error is thrown:
    SecurityError: Error #2123: Verletzung der Sicherheits-Sandbox: BitmapData.draw: file:///C|/players/myVideoTestHTTP.swf kann nicht auf null zugreifen. Es haben keine Richtliniendateien Zugriff gewährt.
    I've used OSMF 2.0 for the Tests. And I've testet with the sample.mp4/manifest.f4m example.
    Thanks for your answers.
    Greets
    Martin

    Have you seen bug CSCdx31582- Macintosh wont play WMT from CE (ecdn). Guess this is similar to the issue that you have.

  • BitmapData.draw Security Sandbox and LocalTrusted not working?

    Hello there, wondering if anyone else is having the same
    problem -- I have a LocalTrusted security sandboxType -- and when i
    try to access a BitmapData.draw method on a progressive flv, i get
    the error message:
    SecurityError: Error #2135: Security sandbox violation:
    BitmapData.draw: file://file.swf may not access null. RTMP content
    cannot be accessed using this API.
    I've rechecked my sandbox type a zillion times, as well as
    tried putting allow="*" in the crossdomain policy file ....
    is this an error in my security settings -- or is
    bitmapdata.draw on video objects now "gone"?

    Could you try this - Open and swf, rightClick - Goto
    settings, then click Advanced. On the webPage click on "Global
    Security settings panel".
    If you don't find your local directory in there, add it and
    see if things work?
    If not, it would be good if you could post the chunk of code
    which is creating problems.

  • LOCAL_WITH_NETWORK sandbox and SecurityError: Error #2121: BitmapData.draw

    We have an application we run in a localWithNetwork security sandbox.  This application loads many assets from an off-site web server.  In spite of a very permissive crossdomain.xml, swfs downloaded from site give a 2121 error when we convert them to bitmaps at runtime.
      <?xml version="1.0" ?>
      <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
      <cross-domain-policy>
        <allow-access-from domain="*" />
        <site-control permitted-cross-domain-policies="all"/>
      </cross-domain-policy>
    Now, I understand why this restriction with BitmapData.Draw exists in general, and from what I've read in other discussion threads the general solution is to allow less restrictive access via crossdomain.xml.  This is the most permissive I know how to make it, although the documentation on the subject is not the most concise.  Are there details I'm missing here?
    For the moment we're just running this as LOCAL_TRUSTED, but this requires folks to be setup with the debug plugin which is a maintenance problem.
    Thanks in advance for any guidance.
    jv

    Crossdomain isn’t used in localWithNetwork because there is no “domain” for the request.
    I didn’t think you needed a debug plugin for LOCAL_TRUSTED, I thought any trust file would work.  Did you try creating an AIR app instead?  It might have different security rules.

  • Security issue with NetStream.appendBytes() and BitmapData.draw()

    Iuse appendBytes to continuously and seamlessly stream video data into a netStream. since we're NOT playing the video files directly from a web domain, there is no meaning to the checkPolicyFile property of our netStream object and therefore - we cannot BitmapData.draw() our Video instance with the netStream attached.
    Is there any possibility to get images from the netStream in order to manipulate them on-the-fly?

    I ran into the same problem.  Have you managed to find a solution to get around the security violation?

  • BitmapData.draw problem due to security

    As another thread has posted, there seems to be a problem for BitmapData.draw on the Stratus server.
    After connecting to the Stratus server, drawing any part of the UIComponents will be stopped by a security alert.
    Event after disconnecting to Stratus, the problem still exist.  The only time when BitmapData.draw worked is when
    the application just lunched and havn't connect to Stratus yet.
    I've found another thread in the LCCS forum discussing the same problem, and it seems that over there they found a solution.
    Just wondering of Stratus will apply the same fix or do we have to wait until the new edition of FMS to have this fixed.
    Thanks in advance
    The LCCS forum thread discussing this problem:
    http://forums.adobe.com/message/2803074#2803074

    Hi,
    If you haven't already, I suggest opening a ticket with customer support.
    Jennie

  • Getting Security Error when trying to use bitmapdata.draw method on youtube videos

    Hi All ,
    I am playing youtube videos in UIComponet of flex, but when I trying to capture the image using bitmapdata.draw() method it gives me an secutity error on server  , It works well locally in flex editor.
    Is any one knows how to resolve this bug??
    Thanks in advance
    sujit Rai

    Try nesting the clips and then adding the warp stabiliser to the nest.

  • BitmapData.draw failed on WebcamSubscriber

    Most of the times when I try to snap data from WebcamSubscriber movieclip I get the following error.
    SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: mypath.swf cannot access rtmfp://fms7.acrobat.com/cocomo/na2-sdk-bec0edb4-775b-4f16-94f7-cd43ec89ff10/test. No policy files granted access.
    in some (very few) cases it works, and I can feagure out what are the conditions require for it to work.
    Few weeks ago it was working consistently.
    Will appreciate any help.
    Best regards,
    Gadi Srebnik

    Great, bitmapdata.draw works good !
    however, it didnt happened when I removed the protocol decleration on my previous room/application. When I tried that it tried to connect to fms8 and only when I started a new application/room and removed the protocol declaration it changed to fms4 and it works fine now.
    Does it have anything to do with the specific server node?
    how can I be sure that user connection will allways run on the server that will enable this feature?
    btw, the subscribe from dev panel also work now all the time
    Best Regards,
    Gadi Srebnik

  • BitmapData.draw Security error

    I am drawing to bitmap from MediaContainer:
    var mediaContainer:MediaContainer = new MediaContainer();
    bitmapData.draw(mediaContainer);
    This works, but when I switch video, an error occurs:
    SecurityError: Error #2123: Security sandbox violation: BitmapData.draw
    cannot access unknown URL. No policy files granted access.
    Any ideas?

    Here you go:
    http://flashboard.info/files/DrawTest.fxp
    It has both HTTP and RTMP ways.
    I've tried launching from http:// and file:// - both work fine for me.
    Links inside app are to our production servers.
    Regards!

  • Can't we do augmented reality with StageVideo and Stage3D ?

    Hi,
    I just read the Stage3D documentation and found that :
    "StageVideo and Stage3D are rendered with no transparency."
    It means we will not be able to create augmented apps using these two features ?
    Is there any chance the finale FP11 realease will be able to render Stage3D with some transparency ?

    Hi Remi,
    we started using molehill 4 days ago and found the same problem as you do.
    First we wanted to stream the webcam directly to the StageVideo, with no success.
    Then we created a new Sprite in the Molehill layer in which we rendered the bitmapdata taken from the camera.
    This works but as you pointed out, there is no transparency and so the video/cam would always be beneath the 3d content.
    The solution:
    Create a new object in your 3d space and render the bitmapdata to it. Its working great with no visible extra delay and what would be even cooler...
    will allow you to do alot of funny effects with your camera stream.
    Im sure we will post some sourcecode with example soon.
    The performance of molehill is really impressive and am sure AR will benefit of that very much
    Chris

Maybe you are looking for

  • Creative Zen 8gb Blacko

    My creative?zen 8Gb mp3 player abruptly shut down leaving a black screen but the power on, and has continued to do so for nearly a month now, I have Formated my player with no results, it would appear the machine has powered down but the battery ligh

  • How to connect MacBook Air OS 10.8.2 to wireless HP Officejet all in one 4630 e printer

    How to connect MacBook Air OS 10.8.2 to wireless HP Officejet all in one 4630 e printer

  • Earbud problem

    I have a problem with my refurbished fifth generation video iPod. When I plug my earphones in I can only get sound out of one earbud. I tried another pair of earphones but I had the same problem. Both pairs of earphones work fine with my PSP. I tried

  • Getting "n" speed!

    I have a G5 single 1.8GHZ tower. I have an airport extreme card installed and am using the newest router, the one capable of 802.11n. However, in the Network Utility it states that my Wireless Network Adapter is only 802.11g. How do I get the "n" spe

  • Please answer this simple question: it plays an important role

    How to write query to retreive the latest record by using PN-BEGDA , PN-ENDDA, SYDATUM,. I know using RP-PROVIDE.......other method using query i require it is urgent