Saving Image Of Canvas?

Jul 19, 2009

I am trying to make a flash application that can save (to the user's local hard drive) a screen shot of the canvas (or more accurately part of it).I've dabbled with Quasimondo's Bitmap Exporter which did some funky stuff to render an image, ship it to a php script on the server, and bounce it back to the client. But not only is that inefficient it also has two other major flaws:

1) it's written in actionscript 2 so I can't use any actionscript 3 abilities.

2) it breaks as soon as one of the images on the stage is defined as a variable brought in through $_GET rather than hard coded. (the image comes in fine but then the rendered finished product is a blank white image)

View 6 Replies


Similar Posts:


Flex :: Saving Canvas And Dropped Image

Jun 10, 2011

I have an image loaded from an url and added to canvas as child. Then I am drag and dropping another image on it which also uses the senocular transform so the image can be transformed on the canvas. I have coded in such way that the transform handles shows up only after it's dropped on canvas. The image shows up correctly. But I am trying to save the result image (that is the main image and the dropped image on top of it), I only end up with the main image that was loaded earlier. The dropped image doesn't show up.

Below is the code for handleDrop() that is fired on dragDrop event and prepares the final image.

[Code].....

View 1 Replies

ActionScript 3.0 :: Saving BitmapData In Image Component And Clear Canvas

Feb 10, 2009

I made a program in Flex that uses the actionscript 3 drawing api. I am drawing on a Canvas and on every mouseUp event I save the bitmapData in an Image component and clear the the Canvas. That works great, but the problem appears if I want to add a background to the paint that was drawn.

Here are the mxml components:
Code:
<mx:Canvas id="_backgroundColor" width="100%" height="100%" x="0" y="0" />
<mx:Image id="_image" x="0" y="0" mouseEnabled="false" />
<mx:Canvas id="_paper" x="0" y="0" />

And here it is the function I have on the Canvas (_paper) mouseUp
Code:
private function onSaveModifications(evt:PaperEvents):void{
var bmpData:BitmapData = new BitmapData(this._paper.width,this._paper.height,true,0x00FFFFFF);
bmpData.draw(this._paper);
this._image.source = new Bitmap(bmpData);
this._paper.graphics.clear()
}

I want when I set the _background Canvas background color to see it, but I cannot because the Image component(_image) where I save the bitmap is masking it.

This is how I set the background
Code:
this._background.setStyle("backgroundColor",0xff0000)
Do you know how can I make the pixels of the bitmap that weren't drawn to be transparent?

View 2 Replies

Flex :: Skin A Canvas With Image And Scale It To Size Of Canvas In It?

Apr 9, 2011

I'm trying to skin a canvas with an image (which is essentially a custom border for the canvas). I've been trying the backgroundImage style as well as the borderSkin style. I can't get the image to scale to the full size of the canvas though. I was wondering what the best way to go about this is.[code]...

View 2 Replies

Asp.net Mvc :: Saving A Picture From A Browser Canvas?

Feb 25, 2010

I'm currently developing a website in ASP .NET MVC and I require functionality for a user to be able to draw a picture on a canvas which can be saved in a database.

View 5 Replies

Facebook Canvas App Saving Flash Vars To DB?

Jul 19, 2011

I have made a flash game for facebook. All happened right expect when I am saving score in my Db. I had sended vars from flash to php , which I think is not working://Here is how i am sending vars from flash

loadVariablesNum("highscore.php?uid="+iduser+"&usc="+score, 0);

I had check it on my localhost its working perfectly. But when I upload same on facebook it doesnot work out.I had used Php SDK 3 and havenot used fbml. embeded flash with Object and Embed tags

View 1 Replies

Flash :: Saving Image Data Stream To Image Format Using Php Jquery?

Mar 12, 2012

I am trying to generate image of flash charts generated by Open Flash chart library using PHP Mysql database.

I have generated image but it's in some coding format in a div on my webpage. Something like below:

<div id="img_chart_1">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAk4AAAEsCAYAAAA1jTw5AAAli0lEQVR42u3dDdAkdX0n8Keu6s67..../ >
</div>

How can I save this image in any image extension like .png ?

I have to give a button on my page. So when user click on button I have to export this image in PGF file.

So I am trying to save this image with image extension and will give link of saved image in PDF file to show.

View 1 Replies

ActionScript 3.0 :: Show Captured Image In MovieClip Without Saving Image First?

Jan 31, 2009

How can I show an image that I have just captured with the webcam?I am able to save that image using PHP but before I save it, I want to show a preview. How can I do this? Here is a snippet of the code that I think can be used to do this:

ActionScript Code:
foo = new BitmapData(640,480);
foo.draw(myvideoobject, scaleMatrix);

[code].......

View 3 Replies

ActionScript 3.0 :: Save Image Out Of Flash (whole Canvas)?

Dec 15, 2009

I'm creating a flash fun thing where you dress up a character by just dragging and dropping little images, everything is working fine.

I want to add an option to save the image you have created, I can do this but the problem is you have to set a movie clip to capture, the thing i want to capture is a few movie clips layered on top of each other(the finished character).[code]...

View 3 Replies

ActionScript 3.0 :: Adding Image To Canvas Won't Start At 0 (but Img.y Says 0)

Sep 9, 2011

I am going nuts! I have a canvas which I am trying to add a background image to. I am not setting the Y position, but after I add it to the canvas it always starts about 40 px down. If I trace the Y position it still says 0, even after a timer. I have tried to move it to the parent canvas and got the same results.

View 1 Replies

Flex :: Put An Image Inside A Canvas Without It Overflowing?

Aug 13, 2009

I have an Image nested inside a Canvas.

<mx:Canvas>
<mx:Image source="@Embed(source='assets/library.swf', symbol='Waves')" />
</mx:Canvas>

I'd like the Image not to overflow the bounds of Canvas. But when I set width and height on the Canvas, my Image disappears. Canvas also doesn't seem to respect horizontalScrollPolicy.

Seems easy enough, but as the official Flex documentation is down at the moment, I thought I'd turn to SO.

View 2 Replies

Flex :: Adding Selectable Image On Canvas

Dec 24, 2009

I am new to flex, and do not know how to add an image (or other ui component) to canvas, so user can select it (and see that it's selected), also I want to add a possibility for example to click backspace and remove selected image from scene. How to do that?

View 1 Replies

Actionscript 3 :: Set Bitmap Image In Canvas Background?

Nov 18, 2010

I 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?

View 1 Replies

Flex :: Dropped Image Be Rotated In Canvas?

May 25, 2011

this is the code for 3d rotation [code]i want to rotate the image after dropping them in the canvas.i am able to rotate them in the panel.

View 1 Replies

Flex :: Dynamically Add Different Items To ThumbContent Canvas And Use Scroller Canvas To Scroll

Jun 5, 2009

I have the following code in my flex project.

[Code]...

I want to dynamically add different items to thumbContent canvas and use scroller canvas to scroll. I see than the height of thumbContent bigger than 7977 it truncate from scrolling. So - I see the scroller canvas with empty space on top. Then I scroll to bottom - I see the content of thumbContent and at bottom scrolling I see empty space too.

View 1 Replies

Flex :: Place An Image In Specific Coordinates On Canvas?

Nov 30, 2009

I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.

View 2 Replies

Actionscript 3 :: Flash Upload Image To Drawing Canvas

Jul 18, 2011

im trying to create a online business card editor to learn flash again, one of the functionality im trying to achieve is being able to upload an image (jpg,png etc) and place said image onto a drawing canvas and then being able to scale the image and rotate the image and move the image around. can some one direct me to a decent tutorial for this kind of functionality.

View 1 Replies

ActionScript 3.0 :: Unable To Make An Image As An Object On The Canvas

Apr 30, 2010

I have an app wer i drag and drop images onto a canvas and then move them on the canvas to arrange them appropriately. After that i shud be able to click on those images and draw connectors between them as the user seems required. But after dragging and dropping the images on the canvas and arranging them, when i click on the image i am getting a typeerror 1009 error, i.e, "cannot access a property or method of a null object reference".

Actually after arranging the images, i add an event listener to the image(proxy) on the canvas:

image.addEventListener(MouseEvent.CLICK, mouseClickk);
image.addEventListener(MouseEvent.DOUBLE_CLICK, mouseUpp);
MouseClickk Function:

[Code].....

View 0 Replies

ActionScript 3.0 :: Choosing Background Image From File On Server As Canvas

Nov 28, 2010

I need the exact simple application but the ability to choose a background image from a file on the server as the canvas and I want to save the created image on a server file instead of on the client machine. The ability to change the pencil drawing size would be an additional plus. I work with php and mysql so I would like to use them to store the file parameters, even as a blob in mysql, along with some additional user (server) defined variables (I can do the php/mysql side if I can get the file there, I understand there is an swf to png ByteArray class that might be able to save on server. The project is for an opensource group so the final product would need to remain as such, I would be able to pay for the modifications mentioned above. The source files are available at the links below. [URL]

View 1 Replies

ActionScript 3.0 :: Canvas Size Limit 2880 But Image Width 5000

Aug 20, 2010

My artist drew a beautiful island but it's 5000 in width. We scroll it as it's for a Virtual World. - it's in layers and we scroll the different layers at different speeds. Flash documentation states that the limit is 2880 BUT it does work in the player i.e.: you can see the full island but it does run a little slow.

Should I
a. Create a smaller island of 2880 which is a shame as I would have to get rid of a lot of good stuff
b. Split it into two images and dynamically connect them with code.

Also, I have different layers scrolling at different speeds which would make things more difficult to look natural.

View 13 Replies

Flex :: Saving An Image Of A Component?

Oct 7, 2009

Im currently trying to work the imageSnapshot function in flex. Ive been looking hard but I cant seem to find a solution to my problem. I wish to take a screenshot of one of my components, to capture the final output of my program, since a plain "printscreen" cuts off some of the output due to it scrolling. My current code looks like -

<mx:ApplicationControlBar dock="true">
<mx:Button label="Take snapshot of Profile"
click="takeSnapshot();" />

[Code]....

Now i think this is taking the image of the viewstack which I want... But Im stumped on what to do from here! Is it not possible to now just copy the image to the clipboard, or produce a new window in my browser with the entire image inside?

View 3 Replies

ActionScript 2.0 :: Flash Php Image Saving?

Feb 26, 2010

I'm using sephorith's excellent export jpg with flash and php set up which can be found here:

[URL]

I have this working, taking a simple grab in my flash movie and finally displaying the image in the broswer as a jpg. This is all fine, however, instead of displaying the image in the browser, I want to just save it into a folder. I know very little php, but in the file provided, he uses the line:

[CODE]
// print out the correct header to the browser
header("Content-type:image/jpeg");
// display the image
imagejpeg($img, "", 90);

View 1 Replies

ActionScript 3.0 :: Saving Map Image To User's PC?

Jul 17, 2010

I am working on a web-tool that allows users to add pre-loaded tiles of data as overlays to Google Maps. I then want users to be able to save their work. I'm approaching this as them saving a series of images that they can then import to work and add text etc to a layout they choose. If you want to see it in action, it's available here: [URL]

My issue is saving the map image.

I started by trying to use BitmapData.draw() and the JPGEncoder class in the as3corelib and this works for the 2 legend images. It also works for the map when testing on my PC (and changing the Global Security Settings). As soon as you put it on the server it hangs at the BitmapData.draw() line, and I've since found out that this isn't resolvable:

code.google.com/apis/maps/faq.html#bitmapdata

I went back to trying to use map.getPrintableBitmap (code.google.com/apis/maps/documentation/flash/reference.html#Map.getPrintableBitmap; which I'd previously discarded due to poor resolution). I can still pass this through JPGEncoder and am now happy with the result. However, the code only runs when no overlays have been added to the map.

My "save code" goes as follows:

Code:
import JPGEncoder;
Security.loadPolicyFile("195.62.199.219/pctsla/gis/supporttool/crossdomain.xml"); //see note below

[Code].....

Note: PHP cannot be installed on the server I am working with for various reasons so I need to pursue other routes.

View 0 Replies

ActionScript 3.0 :: Saving Image To Disk Without PHP

Nov 3, 2009

Is it possible to save image from Flash with ActionScript3 without using of any server side script? I need the download image functionality on application distributed on a cd so I can't use any server side scripts.

View 1 Replies

ActionScript 3.0 :: Saving Masked Image To Server?

Apr 6, 2009

change the following php/AS3 to make it save the dynamically created masked image to the server instead of offering it for download? You have to pass it variables from the as3 AT THE BOTTOM OF THIS POST...

PHP -
<?php
if(isset($_FILES['Filedata'])) { // basically if file data exists to actually upload.

[Code]......

View 9 Replies

ActionScript 3.0 :: As3corelib Saving Image Wrong?

Nov 12, 2010

I have a game where you can throw snowballs, get a score, and a accuracy at the end.I want to be able to let the use save the score to a jpg.The code works fine, image saves right to the computer.it get the movieclip.height and movieclip.width (which is about 300x 100 px)But when I look at the image it makes a 300x100 jpg image but puts every data thats being written in the top left corner.

View 6 Replies

ActionScript 1/2 :: Saving Image To Server From Stand Alone SWF Using PHP?

Jan 12, 2010

I built an information terminal for the shop of a friend of mine which uns as fullscreen application.On this terminal the swf file is running as a stand alone file by unsing the flash player directly.I want to save a snapshot (jpg) from a webcam if someboy presses a button.This does work as long as I run my application (swf) by using the browser (Firefox , Apache and localhost).But if I try to use it as it should be used no image is beeing created.
 
There was an error when first testing the application which forwarded me to an Adobe site where I had the possibility to grant files permissions, which I did for the file (the SWF) that needed it.Did I do something wrong, or is there some permission thet I have to grant before it works as it should be?

View 1 Replies

ActionScript 3.0 :: Loading In An Image At 300 Dpi Manipulating It And Saving It As A 300 Dpi Png

Feb 27, 2012

I have a project where the user uploads a large 300dpi image, then manipulates it (drag it, rotate it, position it). And the user can reuse this 300 dpi image, basically to make something like a t-shirt pattern. Then when the user is ready, they save this t-shirt pattern, and the save format is a large 300dpi png. This saved png file is for printing.  Now I figure I can have PHP take bitmap data (as binary I assume) and the php can create the png. Is it a good idea to use Flash for this?  I will have to scale down the users loaded 300dpi image so they can position. Then I assume scale it back up when it comes time to save Does anyone think Flash can't handle this?

View 4 Replies

Actionscript 3 :: Saving Image File On Flash Without PHP

Jun 28, 2010

Is it posible to save a flash scene into an image and save it on client-side hard drive ? Without PHP. I dont care if user has to change flash security options.

View 1 Replies

Actionscript 3 :: Saving Webcam Image To A Website?

Jan 19, 2011

How can i save a webcam screenshot to a website?

I know you can save it to your hard drive using:

var browseFileReference = new FileReference();
browseFileReference.save(video);

But how would i go about it to save this image to a website, lets say flickr or facebook or something.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved