How to reduce resoluion of bitmapped image

Hello friends
                     i am taking the bitmapped of a canvas a having height 390 and width 234.using that code
                    var snapshot:ImageSnapshot = ImageSnapshot.captureImage(cnvParent);
                     var bdata:String = ImageSnapshot.encodeImageAsBase64(snapshot);
and post the bitmap data to php end(server side) throug HTTP service.it creates an image of same resolution of 390x234. but now i want to send the image with resolution 200x150 resolution of same canvas having height 390 width 234.so can any body guides me wot kind of changes required in my code for this.
Thanks And Regards
     Vineet osho.

hi,
The following process will return a resized image form a displayobject
private function rescale(content:DisplayObject, width:int): BitmapData
var scale:Number=width/content.width;
var bd : BitmapData = new BitmapData(content.width*scale,content.height*scale);
var mt:Matrix=new Matrix();
mt.scale(scale,scale);
bd.draw(content,mt);
return bd;
for instance if I have an image thats 1000*750 and I want the width to be 250
var bd:BitmapData = rescale(image.content,250);
with snapshot you would need to convert the bytearray data into a bitmap for the function to work.
David.

Similar Messages

  • How to convert color of bitmap image?

    I am programming with Acrobat 7.
    I'd like to change color of all object to CMYK color or gray.
    In case of plain object like path or font,
    I need to seek CMYK color from the object's RGB color.
    and I change the property of the object color space and value with it.
    but in case of bitmap image, i don't know how to at all.
    it has numerous colors.
    I hope your advice.

    Thank you both of you.
    by the way, Leonard, Could you tell me that APIs more detailly?
    I have look into the document for long time. it is still hard to find proper API.
    I have to say this again. I am trying to find APIs based on version 7.
    I am using custom function ACEconvertColorProfile which is placed in snippetrunner. it consists of these APIS ACMakeColorTransform, ACApplyTransform, and so on.
    but I can't find the way to convert bitmaps once and for all.
    I hope you give more hint.
    Thanks again.

  • Query: How does scale9grid work with bitmap images?

    I have a custom component I use as website header built in flash catalyst. Below is the code for the component.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:d="http://ns.adobe.com/fxg/2008/dt">
         <s:BitmapImage smooth="true" source="@Embed('/assets/images/TIBB/Header.png')" d:userLabel="Header" width="100%" />
    </s:Group>
    The problem is that it doesn't scale according to 9 slice scaling. How do I use scale9grid for the bitmap image?

    http://www.roseindia.net/tutorial/flex/flex4/components/9slicescaling.html

  • How can I convert a bitmap image into an array in LabVIEW 6.0.2, then to a spreadsheet for further analysis without NI-IMAQ or Vision?

    I do not have NI-IMAQ or NI Vision.
    I acquired the image using a picolo board then just saved it as a bitmap file.

    You want to convert it to an array of what? Of numbers? Of LabVIEW colors?
    The "Read BMP File.vi" VI outputs a 1-D array of the pixels, but I suspect it is not exactly in the format that you need. I am NOT sure, but I think that each group of 3 elements of that 1-D array (which is inside the cluster "image data" that the VI outputs) represents the red, green and blue levels of a single pixel (but it may be hue, saturation and lum.). Also, since it is a 1-D array, you would have to divide it by the width (which is also included in the "image data" cluster) to get some sort of 2-D array of data.
    You can find the "Read BMP File.vi" VI in the functions palete> "Graphics & sound">"Graphics Formats".

  • How to reduced size of PNG images

    size of my application is increases because I used PNG images . Is there any way to compress the PNG images size which will help me to reduce the size of application

    Did you try to save all PNG files in the big PNG file?
    This can help you to reduce size of file header of multiple PNG file.
    however this coz you to change display PNG file process by
    cut from big PNG file instead of read and show from each multiple file.

  • How to reduce number of colors in an image

    I am fairly new to Photoshop and I'm learning as I go, so I apologize for using your time.  I haven't worked with images that much - I've used MS Digital Image Suite with photos from my camera.  That's the extent of my knowledge.
    I am taking over a job from someone who is gone and I can't ask him how to do this.  He used Photoshop to reduce the number of colors in an image (for example, a color drawing or clipart) to 2-6 colors.  I haven't been able to figure this out.  I've visited this site that explains how to reduce tones but it's still a lot of colors.  I thought I might learn something from this link that explained how to make Photoshop cartoons, but I didn't.  I've done a lot of searching but nothing seems to explain this.  I know that the other guy had some knowledge of Photoshop but he wasn't a power user.
    Thanks to anyone who will help me.  (I am using CS5.)

    Are you sure that he was using Photoshop? (see my third solution)
    There are some plug-ins for Photoshop, but they basically do the same as the posterize or index mode: http://www.topazlabs.com/simplify/ (commercial) see this panel for colorizing comic art: http://vimeo.com/user3771002/videos
    I would rather use posterize, as an adjustment layer, as you can control it.
    Try with this layer stack, from bottom to top:
    Convert the original image in a Smart Object, in order to use Smart filters and blur the image (Gaussian Blur, or noise>median or blur>smart blur or blur>surface blur could be interesting internatives) would be useful, to make smoother posterized areas.
    A dodge/burn layers (a neutral gray layer in overlay mode) to adjust areas using the Dodge/burn tools.
    the Posterize Adjustment layer, with very few colors
    On top of it, put a gradient map adjustment layer, to control the posterized colors
    Vectorizing in Illustrator can also be used to reduce the number of colors. Live Trace: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6229a .html
    More on the topic: http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-622aa .html

  • How can i reduce the size of Images  in MIDlet

    Hi all,
    How can i reduce the size of Images in Form,bcoz they are covering lots of spaces in form due to that other items are not displaying in specific order.
    Best regrads
    karan

    Better you can use Canvas class and using drawImage() function you can show the image. Before that you have to Get the maximum size of your phone screen using the following:
    x = (width/2) - (image.getWidth()/2);
    y = (height/2) - (image.getHeight()/2);

  • How do I overlay n number of  bitmap images using Java.

    Hi All,
    I have a task of creating a composite bitmap or a .gif image from "n" number of bitmap images , so that the resulting composite image will look like as if all those "n" images were placed side by side . How can I achieve this ? Can you point me to some place where I can understand the concepts behind this?

    Create a new BufferedImage with the dimensions of all the images you want combined, then paint all the images into it through the Graphics object you can obtain from the BufferedImage. Then write out the image using the ImageIO class.

  • How Can I Clean up Imported Bitmap Images

    Hi, I am using Flash 5. I have imported a sequence of .png images and they are looking pretty rough and bitmapped so I wanted to clean them up.
    1. Do I have to select each frame after import and adjust the bitmap settings for each image or can I doo this somewhere so it affects al images?
    2. I can’t find the settings for cleaning up the bitmap images. I thought they would be in the “Properties” panel?
    3. Is there a way to fix the rasterization or clean up an imported .swf or is it better to clean up the sequence before saving as an .swf?

    Ned Murphy wrote:
    Ideally you should have images cleaned up/ properly sized / optimized before you import them into Flash.  Once they are in Flash, one thing you can do that can help how the image displays, especially if you manipulate its size while in Flash, is to set the image to allow smoothing.  This can be set using code or can be manually applied to the image in the library by right clicking it, selecting Properties, and checking the option to Allow Smoothing.
    Thanks Ned,
    Wow, exactly what I was looking for. Thanks. A huge improvement in the look of the gradients.

  • How to set background as white colour for Bitmap images in sapscripts?

    Hi,
    Can anyone let me know that How to set background as white colour for Bitmap images in sapscripts?Actually,I am getting grey as background as defualt for my Bitmap images.
    Sorry,in my previous question,I posted viceversa.I am mistaken.
    Thanks,
    Balaji

    Hi,
    The problem can be solved by changing the way you save the original image.
    Take a look at this thread which explains;
    Problem with logo
    Regards,
    Nick

  • How to transfer bitmap images?

    Hello,
    In the .NET client application that I am developing, I have to transfer bitmap images from the client to the SAP server. The size of each image file ranges from 1M to 10M. I am wondering if there is any standard RFC or BAPI that I can use to transfer chunks of binary data. Or, perhaps there is an RFC that can be used to transfer files.
    Thank you in advance for your help.
    Pradeep

    After doing some research, it appears that data has
    to be stored in ABAP XSTRING format.
    How do I convert byte array to XSTRING and vice versa?
    Thanks
    Pradeep

  • How to load and save a Bitmap Image?

    Hi, I have to load a directory of bitmap images, take the background(in this case: light green) and then swap those exact pixels with another image's corresponding pixels, and then save them in the same format(bitmap) in a different directory. Can anybody advise me on which libraries I need to use, and how I should approach this? I need help with every step so any help will be good. Thanks. Basically I need to do the following:
    1. Load 2 directories of images(Lets say the images are corresponding like Image1A and Image1B)
    2. Take Image1A's green pixels and swap them with the corresponding Image1B's pixels.
    3. Save Image1A in a new Directory.
    This will go on for however many images there are in those 2 directories. Can anybody advise me how to do this? I need critical help in all three stages. Thanks.
    Edited by: Taufiq on Feb 25, 2008 9:10 AM

    Taufiq wrote:
    Doesn't java handle bitmap images? Does it HAVE to be gif etc. ?
    Edited by: Taufiq on Feb 25, 2008 10:17 AMI'm not familiar with windows-specific stuff, but ImageIO supports additional image readers/writers. You should google.
    Edit: Actually, I just checked and ImageIO comes with readers and writers for both BMP and WBMP files:
    http://java.sun.com/javase/6/docs/api/javax/imageio/package-summary.html

  • How to reduce size of image while uploading it in livecycle pdf.

    Hi,
    I have created a pdf with Image field using live cycle designer.
    I have selected "Sizing: Scale Image to fit Rectangle".
    Now the problem is the pdf which i have created is 1.5MB and if i import or upload a 2.5MB image in image field then the size of pdf becomes 6MB.
    I have around 20 image fields in my pdf report , so if people keep uploading high resolution images in the pdf then the pdf becomes more then 15MB, slow and unmanagable.
    Is there any way by which even if I upload a 5MB image the it should automatically reduce image size?
    As the users does not bother to reduce the size of image they just upload high resolution and large size image in pdf.
    Please tell me the way through which i can reduce the image size automatically while uploading.
    Regards,
    Kartik Shrivastava

    Hi Prashat
    I tried by reducing the size of container , But scroll bars appears automatically .
    The size of Picture remains same .
    Please tell me if there is any option to fix the size of container ... so that picture reduces its size automatically .
    Thanks & Regards
    Shaveta

  • How to Convert Bitmap Images into WPF XAML files

    I am tasked with converting about twenty bitmap images into a workable XAML file complete with all of the path statements, line segments, arc segments, etc. Is there a tool out there that take the bitmap image and create an entirely new XAML file?
    Thanks,
    Barton

    Hi,
    maybe:
    http://stevenhollidge.blogspot.de/2012/05/converting-images-to-paths.html
    http://stackoverflow.com/questions/129972/convert-an-image-to-xaml
    http://stackoverflow.com/questions/15082716/can-we-convert-an-image-to-xaml-using-expression-blend
    this is not a trivial task [and maybe beyond the scope of this forum]. If you had some vector image like svg images there might be a control out to use, but with raster images, I dont know of any control or code to use; I *think*, you will have to vectorize
    the image content yourself, which isn't that easy...
    So, is Background and Foreground easily distinguishable? Do shapes overlap? ...
    If there are only some shapes in the image and BG and FG can be separated easily then you could "scan" the image by some chaincode like operation to get the contours/contour vectors and then decide what to do. If there are patterns in BG or FG
    things will become more difficult, you then will have to perform more math-to-image operations and a vector-representation while reading/scanning the image might not be enough (keywords are computer vision, pattern recognition [with multi-linear-forms] etc).
    Maybe an existing computer vision [-able] component loke opencv can help a lot...
    Edit: I just did a google lookup and found eg this:
    http://www.cs.ucla.edu/~dt/theses/vasilescu-thesis.pdf
    I havent read it so far, so I cannot say, if its what you need, but title and a quick view into looks promising/interesting.
    Regards,
      Thorsten

  • Converting bitmap image sequences to Flash

    Hello,
    I use LightWave 3D to create a set of characters that are
    simple talking heads. Composited in Mirage and edited in VT4, it's
    all bitmap images. You can see a sample here:
    Subversive
    Entertainment
    That version was intended for TV but isn't going to sell. I'd
    like to try it as an animated editorial cartoon embedded in a Flash
    player at online newspapers. But when I compress the video it
    doesn't convert as cleanly as I know a direct Flash file would. I'd
    like to import the image sequences into Flash and converting them
    to symbols(?) or movie clips(?) or(?)...
    What would be the best way to handle the image sequences in
    Flash? They are currently 180 frames long for each character, but I
    could reduce the image sequence to as little as 60 frames. Once the
    image sequence is converted to a set of symbols(?) they would be
    re-used over and over.
    I imported a 180 frame image sequence and it put one image on
    each frame in the Flash timeline. How would I convert that entire
    image seqence to a sequence of symbols(?) that I could re-use. When
    I exported it as a movie it made a .swf file that looks great but I
    don't think that's what I want to work with within Flash. (I'll
    create a differnt background in FLash as well.)
    Whew,
    Hope this made sense.
    TW

    after importing, select the entire range of keyframes
    containing your image sequence. Right-click
    over them and select COPY FRAMES.
    Open Library and create a new symbol.
    PASTE FRAMES into frame 1 of this new symbol.
    On main timeline create a new layer (delete original layer)
    and drg instance of your new symbol to
    it. Now you have a nested animation that can be reused.
    Chris Georgenes / mudbubble.com / keyframer.com / Adobe
    Community Expert
    tomwood2 wrote:
    > Hello,
    >
    > I use LightWave 3D to create a set of characters that
    are simple talking
    > heads. Composited in Mirage and edited in VT4, it's all
    bitmap images. You can
    > see a sample here:
    >
    > www.subversive-entertainment.com
    >
    > That version was intended for TV but isn't going to
    sell. I'd like to try it
    > as an animated editorial cartoon embedded in a Flash
    player at online
    > newspapers. But when I compress the video it doesn't
    convert as cleanly as I
    > know a direct Flash file would. I'd like to import the
    image sequences into
    > Flash and converting them to symbols(?) or movie
    clips(?) or(?)...
    >
    > What would be the best way to handle the image sequences
    in Flash? They are
    > currently 180 frames long for each character, but I
    could reduce the image
    > sequence to as little as 60 frames. Once the image
    sequence is converted to a
    > set of symbols(?) they would be re-used over and over.
    >
    > I imported a 180 frame image sequence and it put one
    image on each frame in
    > the Flash timeline. How would I convert that entire
    image seqence to a sequence
    > of symbols(?) that I could re-use. When I exported it as
    a movie it made a .swf
    > file that looks great but I don't think that's what I
    want to work with within
    > Flash. (I'll create a differnt background in FLash as
    well.)
    >
    > Whew,
    >
    > Hope this made sense.
    >
    > TW
    >

Maybe you are looking for

  • Satellite A200 - Flash drive has stopped working

    I can't get my flash drive to work anymore. I had to uninstall it a while ago because people were filling up my computer with pictures and the only way that I thought that I could get them to stop was to uninstall the flash drive, well now that I wan

  • Upgrade R12.0.4 DB 10.2.0.3 to 11.1.0.7

    Hi All, I have followed the below steps to upgrade R12 DB on SLES 10 SP2 from 10g to 11g 3- Perform pre-requsites for patch 6928236 4- Apply INTEROPERABILITY PATCH 6928236 5- Apply TXK - 12.0.4 Consolidated Patch 1 7207440 6- Perform patch 7207440 po

  • ORACLE RAC - Clusterware 11Gr1  -

    Hi, We are starting a fresh installation of an Oracle RAC database on: IBM AIX 5.3 Processor Type: PowerPC_POWER7 Processor Implementation Mode: POWER 6 Processor Version: PV_6_Compat Number Of Processors: 2 Processor Clock Speed: 3108 MHz CPU Type:

  • Performance Issie in SQL Statement Using Hints

    Hi, I am using Oracle version 10G. I am using a INSERT statement as: INSERT /*+ PARALLEL (TEST,4) */ INTO TEST(COL1,COL2,COL3) SELECT COL1,COL2,COL3 FROM DUMMY; For increasing the Performance I am using the above statement. Will the usage of Hints in

  • SAP BW timeout

    I am running a Crystal report against a BW query, via the Business Objects Enterprise XI scheduler, which is returning a successful completion message even if the query times out on the BW server. Any thoughts as to why it should return a "successful