How do i resize the image getting captured by ImageSnapshot???

hey guys... so im taking an image of a movie clip using ImageSnapshot.captureBitmapData(myClip);
i need to resize the bitmap data that i get back, the size needs to be 720X486
the code i have is...
var myClip:MovieClip = event.target as MovieClip;
var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myClip);
var pngEncode:PNGEncoder = new PNGEncoder();
var ba:ByteArray = pngEncode.encode(imageBitmapData);
any ideas??? i tried to use the matrix.scale, but i guess i didnt understand on how to use it properly...
any help is greatly appretiated!!
thanks

Hi,
You can also use the below approach to  capture the BitmapData of your moviclip(myClip).
So that you can make use of matrix class to resize the bitmap image.
     var myClip:MovieClip = event.target as MovieClip;
     var imageBitmapData:BitmapData = new BitmapData(myClip.width,myClip.height);
    var pngEncode:PNGEncoder = new PNGEncoder();
    var ba:ByteArray = pngEncode.encode(imageBitmapData);
    var m:Matrix = new Matrix();
    imageBitmapData.draw(myClip,m);
    m.scale(1.2,1);
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari

Similar Messages

  • Photoshop CC: Have a template that I moved image into.  Image is too small.  How do I resize the image while in the template?  Or must I go to original image file and resize there again and again until I get the right fit?

    I have a template that I am able to plug different pictures into at different times.  The problem is that when I plug an image into that template, I find that the image is either too big or too small.  Is there a way to plug the image into the template and resize the image (and not the template itself) OR will I have to go to the file with the original image and resize it there and then try to plug it in to the template to see if it fits------and if it does not fit, go back to the original file with the image and resize it again and see if that fits---and so on and so on...........?  I have tried the" image size" option but it's hit or miss------mostly miss!
    Thanks!

    Read up on Smart Objects. It looks like you have no idea as to how to create and use them.
    Jut create a Smart Object from the layer containing whatever it image it is that you are "plugging into your template".  But you do need to learn the application at its most basic levels.
    Photoshop is a professional level application that makes no apologies for its very long and steep learning curve.  You cannot learn Photoshop in a forum, one question at a time.
    Or is it possible that you don't even have Photoshop proper but the stripped-down Photoshop Elements?"
    If the latter is the case, you're in the wrong forum.  This is not the Elements forum.
    Here's the link to the forum you would want if you're working in Elements.:
    https://forums.adobe.com/community/photoshop_elements/content
    If you do have Photoshop proper, please provide the exact version number of that application and of your OS.
    (edited for clarification)

  • How do I resize an image within a drop zone (not the drop zone itself) in motion 5?

    How do I resize an image within a drop zone (not the drop zone itself) in motion 5?

    I think others would be able to help if you describe a little more why you'd like to do this. Given that drop zones are a way of passing images into Motion that you want to manipulate, resizing a drop zone is the equivalent of resizing the image.
    If you're having a problem with an image from Final Cut being too big or too small, select the Drop Zone in the inspector and make sure the Fit parameter is set to 'Fit' - 'Center' will result in images dropped not being scaled to fit the Drop Zone. 'Stretch' will force the dropped image to fill the space defined by the drop zone,
    If the image is already cropped and scaled up in Final Cut Pro, that is the information that Motion gets - you can't scale down the image to see more of the edges that have been cropped off.
    If you want more than one copy of the image passed via the drop zone, use Make Clone Layer from the Object menu.

  • How can I resize an image without losing resolution or using the crop tool? I am using Photoshop Elements 13 on a PC.

    How can I resize an image without losing resolution or using the crop tool? I am using Photoshop Elements 13 on a PC.

    Hi Peru Bob,
    I've tried two images, the results were:
    Image 1
    Jpg, original file size 923KB, dimensions 848px x 279px.
    After resizing to 848px x 180px with 72dpi, the file size decreased to 164KB.
    Image 2
    Jpg, original file size 809KB, dimensions 1200px x 1800px.
    After resizing to 668px x 722px with 72dpi, the file size decreased to 307KB.
    So, there seems to be a fair file size loss - is this to be expected?

  • Guys, i want to ask on how to resize the images into 1200 pixels wide?

    Guys, i want to ask on how to resize the images into 1200 pixels wide, how to do it? and what are the step by steps on doing that? thank you!!!

    See this link: http://forums.adobe.com/docs/DOC-3691

  • When I send a jpg to a PC in Mail. The image gets embedded and can no t be downloaded. How do I keep it as an attachement?

    When I send a jpg to a PC in Mail. The image gets embedded and can no t be downloaded. How do I keep it as an attachement?

    In you broswer? I'm using Mail App that came with My Mac. Do you know how to do it through there?

  • How can I resize an image in the header?

    I have uploaded my organization's logo into our document, but it is out of proportion to the rest of the document. I've delted it and uploaded smaller versions of the logo and it is still too big. How can I format the image in the header so that it is more reasonably sized?

    Thanks. The triangle was buried in the image. If you hadn’t told me where to look, I would never have found it!
    Michelle
    Michelle Lancto
    Jewish Endowment Foundation
    a division of the Jewish Federation of Western Massachusetts
    Phone: 413-732-9994                Fax: 413-737-4348
    <mailto:[email protected]> [email protected]
    <http://www.jefwesternmass.org/> www.jefwesternmass.org 
    <http://www.jewishwesternmass.org/> www.jewishwesternmass.org
    JEF_Logos_1101_JFWM for email LOW RES
    Confidentiality Notice
    The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy any copies.

  • How resize the image after drag drop according to container

    Hi,
    I have a image which can be drag drop in different size of containers. After drop i want to resize the image by maintaining the aspect ratio according to the container in which it is going to be drop. I will be very thankful for your help.

    thank you, brother
    i will try it see if it is work
    whatever, i will report the result later

  • Resizing the images

    hi,
    i want to resize and centering external images.
    i have done with centering the images.
    but how to do resizing.....here is my code....
    // code for centering images starts
    //Define center coordinates
    var centerX:Number = _root.emptymc_mc.imagemc_mc._width / 2;
    var centerY:Number = _root.emptymc_mc.imagemc_mc._height / 2;
    var movieClipLoader:MovieClipLoader = new MovieClipLoader();
    var loaderListener:Object = new Object();
    //Use the onLoadInit function to get the loaded images
    proportions
    loaderListener.onLoadInit = function(target:MovieClip) {
    trace(target._width + " x " + target._height)
    target._parent._x = centerX - target._width / 2;
    target._parent._y = centerY - target._height / 2;
    // end resizing and centerring code
    // now loading images into movie clip loader
    movieClipLoader.addListener(loaderListener);
    var movieClipHolder:MovieClip =
    _root.emptymc_mc.imagemc_mc.createEmptyMovieClip(" container",
    getNextHighestDepth());
    var movieClipLoaderTarget:MovieClip =
    movieClipHolder.createEmptyMovieClip("loader", 1);
    //Load an image to the target
    movieClipLoader.loadClip(_parent._parent.thumbs.fi
    rstChild.childNodes[2].childNodes
    .childNodes[0].nodeValue, movieClipLoaderTarget);
    // end
    now how to resize the images???

    Thanks for the reply...
    now its resizing and centering the images well but not
    according to the aspect ratio.
    see... i have one mc called imagemc_mc in which i want to
    load the images.
    so first i grab the width and height of the imagemc_mc in a
    varibale.
    var imgwidth = _root.emptymc_mc.imagemc_mc._width;
    var imgheight = _root.emptymc_mc.imagemc_mc._height;
    and then in onLoadInit() method first its check the width and
    height of the target and is it is greater than imagemc_mc then it
    resize the image to the imagemc_mc 's width and height.
    if(target._width > imgwidth && target._height >
    imgheight)
    target._width = imgwidth;
    target._height = imgheight;
    else
    target._parent._x = centerX - target._width / 2;
    target._parent._y = centerY - target._height / 2;
    target._parent._x = centerX - target._width / 2;
    target._parent._y = centerY - target._height / 2;
    its working ....but if image is greater than imagemc_mc then
    the image is squeezing ....it is not according to the aspect ratio.
    please reply..............
    thanks a looooooooot

  • I am unable to email an image from camera roll. the image gets "stuck". cannot input email address or subject line. am unable to cancel and go back to camera roll

    i am unable to email images from my camera roll. the image gets "stuck". cannot insert email address or subject line. cannot cancel... return to camera roll.
    what to do. i tries taking new picture and sending it in an email... same thing... gets "stuck "
    Waht to do ?

    Hello lohmann8,
    Thank you for providing so much detail about the issue you are experiencing with emailing photos from the Camera Roll.
    The first thing I recommend is quitting and relaunching the applications on your iPhone:
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    You can find the full article here:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    If you are still seeing the same issue after quitting and relaunching the Photos and Camera app, I recommend restarting your phone and then resetting if it's still not working:
    Restarting your device
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    Press and hold the Sleep/Wake button until the Apple logo appears.
    Note: Reset your device only if you are unable to restart it.
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    You can find the full article here:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    If the issue persists, the last thing I recommend is backing up and restoring your iPhone:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    iTunes: Restoring iOS software
    http://support.apple.com/kb/HT1414
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How do you shuffle the image order when creating a new slideshow in apterture 3?  i would like to do this automatically when creating a new slideshow.  i see how you do it when you just play a slideshow.

    how do you shuffle the image order when creating a new slideshow in apterture 3?  i would like to do this automatically when creating a new slideshow.  i see how you do it with presets when you just play a slideshow, but i don't see an option to randomly shuffle the slide order when you create a new slideshow.  i know you can sort it by different fields, but i want it to be random.  thanks.

    If you want to rearrange images in random order you can try an AppleScript:
    retrieve a list of selected images from Aperture
    shuffe the list properly
    create an album in Aperture and add the images from the list to the album (make sure that the album set to be orederd manually)
    Here  is a sample script that shuffles the selected images and displays them in random order in Full Screen Mode:
    on removeItem(ims, i)
      -- remove the item at position "i" from a list ims
              if ims is {} then return {}
              if (length of ims is 1) then return {}
              if i < 2 then return rest of ims
              if (i = length of ims) then return (items 1 thru (i - 1) of ims)
              if i > (length of ims) then return ims -- should be error?
              return (items 1 thru (i - 1) of ims) & (items (i + 1) thru (length of ims) of ims)
    end removeItem
    on shuffle_items(ims)
      -- shuffle the items of the list "ims" randomly
              local numitems, ims_shuffled, nextrest, nextpick, i
              set numitems to length of ims
              if length of ims < 2 then return ims
              set ims_shuffled to {}
              set nextrest to ims
              repeat until nextrest is {}
                        set i to (random number (numitems - 1)) + 1
                        set nextpick to item i of nextrest
                        set beginning of ims_shuffled to nextpick
                        set numitems to numitems - 1
                        set nextrest to removeItem(nextrest, i)
              end repeat
              return ims_shuffled
    end shuffle_items
    on shuffleIms()
      -- retrieve the selected images from Aperture
      -- and display them in random order in full screen mode
              local imageSel, shuffled, i
              tell application "Aperture"
      activate
                        set imageSel to (get selection)
                        set shuffled to my shuffle_items(imageSel)
                        set fullscreen to true
                        if imageSel is {} then error "Please select some images."
                        repeat with i from 1 to count of shuffled
                                  reveal {item i of shuffled}
      delay 3 -- chnage that to the time you want
                        end repeat
                        set fullscreen to false
                        return shuffled
              end tell
    end shuffleIms
    shuffleIms()
    Some more code snippets to go from here:
    To create an album:
                        tell library 1
                                  if not (exists album "shuffledAlbum") then
      make new album with properties {name:"shuffledAlbum", image version:shuffled}
                                  end if
                        end tell
    And to add the images from the shuffled list to the album:
                        repeat with i from 1 to count of shuffled
                                  duplicate item i of shuffled to album "shuffledAlbum"
                        end repeat
    Regards
    Léonie

  • Adobe Premiere Elements 11 - HOW DO I KEEP THE IMAGE QUALITY WHEN I RENDER?

    I'm using Adobe Premiere Elements 11, on a Windows 8 PC and when I "render" still pictures, some videos and simple effects -- they lose quality and get grainy --
    HOW DO I KEEP THE IMAGE QUALITY WHEN I RENDER?

    Molnar are you receiving that error during the download or install process?  Also which operating system are you using?

  • How to find out the image size?

    How to find out the image size values(Width and height) in illustrator CS3 using any script. I tried but i got only the document height and width. I need to find out the image BoundingBox value of width and height. Kindly advice me.

    Try this.
    tell application "Adobe Illustrator"
    set heightImage to get height of raster item 1 of current layer of current document
    set widthImage to get width of raster item 1 of current layer of current document
    display dialog (heightImage & " X " & widthImage) as string
    end tell
    JaiMS

  • How do I find the image name and media_link for an ubuntu image in the Gallery?

    I am trying to create VM using Python API.  
    I have a custom Linux image:
    image_name = 'cloudN-Azure-20150205-os-2015-02-05'
    media_link = 'https://portalvhds10ssz63zgvb9g.blob.core.windows.net/vhds/cloudN-Azure-20150205-os-2015-02-05.vhd'
    When I used this image to create VM, it failed.
    I would like to use the ubuntu 1204 image in the Gallery.
    How do I specify the image_name and media_link in my Python code?  Basically, where and how do I find the image name and media_link for an image in the Azure image Gallery?
    Thanks in advance...

    hi sir,
    Did you try to use "List OS Image"? we can get the property form the results:
    result = sms.list_os_images()
    for image in result:
    print('Name: ' + image.name)
    print('Label: ' + image.label)
    print('OS: ' + image.os)
    print('Category: ' + image.category)
    print('Description: ' + image.description)
    print('Location: ' + image.location)
    print('Affinity group: ' + image.affinity_group)
    print('Media link: ' + image.media_link)
    print('')
    Please try it. Any questions or it doesn't work, please let me know.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I change the image selected for the finalized movies pane in all events?

    How do I change the image selected for the finalized movies pane in all events? I made a movie some time ago in iMovie, and a still from this now appears as the image for Finalized Movies in the All Events pane (as well as showing up if I then click on this pane to take me to Finalized Movies). Anyone know how to change or delete this image, please?

    Unfortunately, the suggested solution in that thread does not work and the thread appears to be closed to replies.  That is, even though I am logged in the Reply|Quote|Mark as answer|Report as abuse items are missing.
    The suggested solution is:
    First, I found I had "img100.png" in  C:\Windows\Web\Screen  and
    C:\Windows\WinSxS\x86_microsoft-windows-themeui-client_31bf3856ad364e35_6.2.9200.16384_none_69ee3fa2269e545e
    1. Belonging to the Administrators Group, I replaced file Owner TrustedInstaller with my Username on both "img100.png" files
    2. After resizing the image I wanted to see on the Login screen to the resolution of "img100.png" file,
    I copied and pasted it to both "img100.png" files keeping this way the format (extension) and resolution of the original "img100.png" file,
    which I permanently deleted.
    However, I have not been able to replace the img100.pgn in C:\Windows\Web\Screen even after taking ownership of it and setting the permissions for my userid to All.  I edit it with mspaint and then try to save it. The save starts that then says the
    save was interrupted.
    The appears to be some additional protection besides the standard acls.
    http://www.saberman.com

Maybe you are looking for