Actionscript 3 :: Resize A Bitmap Image Sized 9000x9000 To 150x150?
Nov 17, 2010Is it possible to resize a bitmap image sized 9000x9000 to 150x150? I've heard there are some limits...
View 2 RepliesIs it possible to resize a bitmap image sized 9000x9000 to 150x150? I've heard there are some limits...
View 2 RepliesI am trying to resize an image and display it on stage but i get the.......... error 1119: Access of possibly undefined property bitmapData through a reference with static type flash.display:BitmapData........this is driving me a bit mad because i got most of the code out of essential actionscript 3.0.....I've tried to debug it myself but my debugging skills aren't very good yet
PHP Code:
package NetConnections.PicClick{
import flash.display.*;
[code].....
Use the flash CS4 tool's on a bitmap image after tracing the bitmap image and applying my settings?
View 10 Replieshow SoleilNoir.net changes the size of their dynamic images and or websites to suit the resolution of the end users computer?
View 12 RepliesI have spent some time looking at the Kirupa XML gallery with the thumb navigaition sliderOne problem emerge when i use different sized images (same height, different widths).If one thumbnail is half the width of the others, that thumbnail will be placed directly on top of one of the others. Furthermore if the "large" image also is half the width of the others (which it also is here) it'll get placed starting from the left and have a gray background where there is no image (which makes sense since the background is grey in the .fla).My question is: how i can get the gallery to display all thumbnails with the same spacing between them no matter what width they have (in my case they will all have same height). And if a thumbnail is not as large as the "default size"(for example 67 in height and 100 in width) is it possible to center that image in the "large image" display?
View 7 RepliesI am working on image and i like to scale or resize the image by dragging and resize option.same working as "free transform tool" in flash (design part); i need same functionality in application.
View 7 RepliesI've got an image that I need to programatically add to the stage. In Flash CS4 I did an Import to Library, Export for ActionScript, gave it a name 'myphoto', then inside of a custom class that extends Sprite, I do this:
var bmd:BitMapData = new myphoto(100,200);
var myphotoBitMap:BitMap = new BitMap(bmd);
addChild(myphotoBitMap);
It shows up on the stage much larger than 100 x 200. I tried
myphotoBitMap.width = 100;
myphotoBitMap.height = 200;
but that gets ignored, the image is still far too large.
I tried resizing after the Added and AddedToStage events, thinking maybe my resizing commands were not working because the image was still being processed in some way, but this doesn't work either.
I am loading an image using a Loader. Once loaded, I can get the bitmap data using Bitmap(event.target.loader.content).bitmapData.
However since the images I am loading are quite large (around 2000 x 1600), I would like to reduce the size and create a new smaller bitmap maybe 200 or 300 pixels wide, sort of like a thumbnail. I think it has to do with creating a new BitmapData with the new size. However I am not able to get that working properly.
Is it possible to change the Bitmap size Dynamically in As3..Which is created from the movieClip .
var myBitmapData:BitmapData=new BitmapData(450,282);
myBitmapData.draw(my_mc);
Now I need the same bitmap of 620X225. How to resize the bitmap without modifying the movieClip height and width.
i've been working on a project.. right now, i'm required to make something similar to tilelist component. i've to load external jpgs through as3, and then to resize on the stage.. what i'm looking for is: is there any way to render resized bitmap through as3 like flash does in tile-list component?
View 1 RepliesSo I am working on this project for work and we have a bunch of sprites with transform matrix that contain the rotation, scale, x, and y coordinates of various parts of a character, i.e arms, legs etc. so we are then drawing the individual sprites onto the same bitmap data. Then we store it in a vector and display it later.
The problem is the models are too big. So I want to resize them, without having to rebuild the entire matrix, since I don't want to go through every matrix in the sprites and manual calculate the scale, rotation, x, and y after it has been made samller. Is there a easy way to do this? To resize the bitmap data and maintain the data that is already set up to construct the model? I can't share the code but the psuedo code is: we create a bitmapdata of a specific width and hight.
We the loop through all the children of a wrapper sprite and do a bitmapData.draw of each of the children and use their matrix for the second param, and then have it build to the bitmap.rect.
SWFLoader's scaleContent is not able to do what I'm trying to achieve:
<mx:SWFLoader id="img" width="600" height="400" scaleContent="true"/>
When an image of size 100x80 is loaded inside it, the image does does not resize to 600x400. That's because scaleContent = true.
Then, I set maintainAspectRatio = true. The image did resize to 600x400 but obviously, it was totally out of proportion.
So how do I always fit any sized image to the current size of the SWFLoader while maintaining the aspect Ratio? The resized image may be cropped, which is ok.
SCENARIO: An image of size 1500x10 is loaded inside the above SWFloader. In this case the height(10) should be resized to 400 and the width(1500) should automatically resize depending on the height. A lot of the image will be cropped, which is fine.
I'm using the following code to load a .jpg into a movie clip container the problem is I need the container to be a specific size I tried loader.content.width = 50; and loader.content.height = 50; the height part works but the width doesn't work my image just expands beyond the stage width.How do i set the size of the movie clip container?I don't care if the image gets distorted i have a resize script for the images before they are loaded into flash.[code]
View 1 RepliesI am loading a fairly large image file and want to create a bitmap of the loader content. I want to then use this Bitmap and resize it according to the current dimension of the stage. However, I also want to keep the loader content as "originally loaded" as a reference in case the stage is resized and the user wants to view this particular image again. The way my AS is written as of now, I am manipulating the loader content. How do I not do this? How do I "copy" the loader content so I can manipulate the bitmap copy while leaving the loader content unaltered?
<AS>
var lightboxImage:Bitmap = new Bitmap();
function resizeLightbox():void{
lightboxImage = myLoader.content;
lightboxImage.width = myLoader.content.width;
lightboxImage.height = myLoader.content.height;
[Code] .....
in fact i used fr-ode's full-browser image code. but i dont want to generate full browser images. i want to build a structure like [URL] as you see in site, photos scaling automatically when you resize the window. can anybody write me a statement for this? here is the fr-ode's code which distroyed by me
[Code]...
Some images I load dynamically are too big so I would like to scale them to fit the stage.
[Code]...
this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.
i am building an editor which allows you to resize images and to do this (once an image is selected) I add a visible border to the image that allows you to resize the image. so i want to have a function something like,
[Code]....
and i have to call this redrawborder function inside the MOUSE_MOVE listener that controls the resizing (so that i am constantly removing and redrawing the border). constantly removing and redrawing the frame seems very inefficient. is there some property or better why to do this? i want to have, displayobj.scaleChildren = false or something like that
I already have an image that gets resized. Is there an easy way to add a text box on the bottom of it so that it behaves the same way as the picture?
View 3 RepliesOkay, I know this is a stupid question but, if you bring in a jpg or png image and either convert it to a graphic or a movie clip, or just leave it as an image, is there a way to distort the image other than scaling, rotating and skewing it. For example, I want to change the perspective of an image the way I do in photoshop.Let's say the image is a house, in photoshop, you can take the house and make it look like a trapezoid shape, you know, wider at the bottom than at the top Is there a way to do this using flash tools? Envelope distorting, if you break the image apart doesn't really work.
View 1 RepliesI'm trying to cut up a bitmap image into pieces, and then tween each piece away sequentially. Cutting up the pieces and placing those pieces in an array is where I'm at. But to tween each piece on a timer is where I'm stuck; here's the code:
package
{
import flash.display.*;
[code]....
i can't download more then one image from url
function processXML(e:ResultEvent):void
{
myXML = e.result as XML;
[Code].....
I need to create an Image control from a Bitmap because I have an ItemRedender to use in a List control.
I'm trying to show a list of images (Bitmaps) in a List control and I couldn't by now.
I'm wondering if there is some library (or maybe tutorial?) which can produce Instagram-like color tweaks for Bitmap/BitmapData objects in AS3. Color Matrix/ColorMatrixFilter will not be probably able to achieve such as results or yes?
View 1 RepliesI am trying to replace a movie clip image with a bitmap image and now the code to fire the image(missile) doesn't work. I get these errors:1119: Access of possibly undefined property dx through a reference with static type flash.display:Bitmap.1119: Access of possibly undefined property dy through a reference with static type flash.display:Bitmap
package {
import flash.display.MovieClip;
import flash.events.Event;
[code]....
I'm loading a list of urls of pics from an fql query, then loading those urls with the loader class using this function:_loc is a MovieClip that holds the picture,[code]In onMyPictureLoaded I would like to get the bitmapdata out of loader.content and scale the image (smooth it too) that way, and then reattach it to the _obj MovieClip, but I'm having trouble reattaching that new bitmap to the object.It seems the problem is more to do with events and not having the ability to pass information (_loc, for example) from:loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,onMyPictureLoaded); to the onMyPictureLoaded function.
View 11 RepliesThe basic concept: I want to at runtime overlay (or paste or whatever) one bitmap image asset onto another. The original image asset is a texture on a 3d sphere.Example:3D Sphere with earth texture applied to it. Put a cloud on the earth texture and have cloud move along the earth.
Caveats:Can't use any composite materials because I take a serious perf hit. Want to try working only with bitmaps to see if it is faster.I've gotten this far but don't know how to fill rectangle with jpeg file and certainly have no idea where to go from here..earthBitmap= new BitmapData( 256, 256, true); fillRect will only do a color ... I need what fills a rect with jpeg image and how to edit a bitmap on the fly.
I have an masked image that is externally loaded onto my stage that the user can drag and position.I then need to be able to record or save where and how the user has positioned the image by either -taking a bitmap copy of where the user has positioned the image (my first and easiest thought of how to do this) -or is it possible to get X and Y co ordinates of where they have positioned it I have a movie currently set up but when the user clicks 'save and continue' it takes a copy of the original position of the image - not from where you have last dragged it to?Full code and attached fla file below
Code:
stop();
//--------------
// Loader
//--------------
var imageP1:Loader = new Loader();
[code]....
How can I use a bitmap tile for texturing a vectorial image ?
View 2 RepliesWhat I would like to do is to take a loaded GIF file as a Bitmap and then distort it by stretching and shrinking parts of it, so it would look like it got squished up against the screen. I'm pretty sure that there's no easy way in Flash to go beyond scaling and shearing, but I wonder if there might be some simple techniques to accomplish this kind of effect. By the way, I've also thought of pre-deforming the images in GIMP and saving them there, but I can't find a simple way to do it without learning their scripting language.
View 1 RepliesI have image as Bitmap:
var bitmapImage:Bitmap=getDefaultImage();
I need to set this bitmap as canvas backgroundImage.
I find method myCanvas.setStyle("backgroundImage",url); But i dont need url. Whent i do this:
myCanvas.setStyle("backgroundImage",bitmapImage); I have an error.
How to set bitmap image in canvas background?