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


Similar Posts:


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 :: 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 Image From Flash On Server Under Different Name

Mar 25, 2011

I followed this question:flash Actionscript 3 and php image upload.I copied the code:[code]It works great, I just need to know how to save the image under a specific name, how do I pass an argument to the php script? or is that not necessary, can I change it before calling the script?How would I then call URLrequest to show user the file he uploaded ?

View 1 Replies

ActionScript 3.0 :: Saving Flash Drawing As Png Image To Database?

Sep 5, 2010

i've seen a few good examples to save out a png of the current flash display area from a webbrowser from a flash, such as:[URL]what they normally do is stream the image data through a png encoder to a web server somewhere and then decode the image data back to current webbrowser and then trigger the web browser SAVE function, by prompting user to select a path and file name to save, like a download.however, the difference is when you click that save button, you can save your png image directly to a certain location with a fixed file name, such as on your local computer:

View 5 Replies

Flash :: Saving An Image As A File On The Client Side?

Feb 1, 2011

I'm rather inexperienced with flash and as3, and I've been given a task of writing a program that downloads images from URLs that are provided, and saves them to a specified location on the user's computer.

The idea is to be able to download multiple images (user selects them) and download them all to a single directory (which the user selects first) so that he doesn't have to download them one by one. Also, putting them in an archive and downloading as one file wasn't an option.The only solution I found is using FileReference.save(), which won't work for me because it opens a save dialog.

View 1 Replies

ActionScript 3.0 :: Flash Print Preview And Saving Clip As Jpeg Image?

Aug 22, 2010

I have MC, Print is working,

1. I want give a view/Print preview in a separate window

2. I want save it a jpeg image

View 3 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

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

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

Web Development :: Scaled Image Not Saving When Cropped In AS3

Jun 6, 2011

When I try to save a cropped image that I have scaled, my save function ceases to work, but works perfectly fine when the image is not scaled.

Here's my code:
var loada = new Loader();
loada.load(new URLRequest("img_one.jpg"));
loada.x = 205;
loada.y = 110;
loada.cacheAsBitmap = true;
[Code] .....

View 1 Replies

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 Large Size Image?

Dec 21, 2010

in AS3 we use somthing like this to save image from SWF:

<AS>
import com.adobe.images.JPGEncoder;
var jpgSource:BitmapData = new BitmapData (sketch_mc.width, sketch_mc.height);
jpgSource.draw(sketch_mc);[code]....

Is it possible to save this sketch_mc in a larger size? Suppose its dimensions are 200x200 can we save it to 1000x1000 or something like that?

View 6 Replies

ActionScript 3.0 :: PNGEncoder - Saving Image Onto Server

Dec 23, 2010

I am struggling to encode and then save a png image onto the server. The file 'myImage.png' gets saved onto the server but it is 0kb.

My actionscript is:
import com.adobe.images.PNGEncoder;
import flash.display.BitmapData;
import flash.utils.ByteArray;
// Go to PHP Page.//
bitmap_btn.addEventListener(MouseEvent.CLICK, gotoPHP);
function gotoPHP(event:Event):void {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Upload Image And Saving It To The Local Map?

Mar 2, 2011

how do you upload the image for temporary savings and then save it down to the local map?

My Situation: Making an flash website for my father in law and we got a server/domain which has got no database... Which make it impossible to basicly just save it to a database.

so I will make a admin place where he can go on and save the image to a map specified. and then it will upload the images by it self...

So how do I move the image from the local computer to the server where the website is. He wount have access to the server so he can't manually go in and put the images into the folder he needs an admin way of the website to save the images into the folder by remote access.

View 4 Replies

ActionScript 2.0 :: Saving Swf Contents As Image To Server?

Nov 25, 2003

way to have a specific portion of the stage save as a .jpg to the server.

So, if a user were to draw something, and click a "save" button, they would be able to save their drawing to the server as a jpg.

View 2 Replies

ActionScript 2.0 :: Saving A Movie Clip As An Image?

Mar 14, 2011

I am working on a coloring book web game.

Currently the user can draw with a pencil and fill in colors with the mouse. There is a print option where the user can print out what they drew and colored.

What I'm trying to do is save a specific movie clip as a jpg or a png.

View 3 Replies

ActionScript 3.0 :: Saving Panel Area As Image Question?

Apr 2, 2011

I've been using this code to save my panel area as an image.
 
var bd:BitmapData = new BitmapData(vgrpBottleArea.width, vgrpBottleArea.height);                bd.draw(previewPan);                var ba:ByteArray = (new PNGEncoder()).encode(bd);                                (new FileReference()).save(ba, "MyLabel.png");

This panel named previewPan consists of several images and what i'd like to do is just save the middle portion of the panel. the vrgrpBottleArea width and height the diamentions of the final image i want to save.

View 7 Replies

Flex :: Actionscript 3 - Saving Mx:image With Applied Effects

Jan 5, 2011

I load image to control than I applie some effects, and when I save image it's saving without effects. What should i do?

Here is the code:

private var byteArr2:ByteArray;
private var fileRef:FileReference = new FileReference();
public function process():void

[Code].....

UPDATE Appears new problem as I am using var data:BitmapData = new BitmapData(currImg.width, currImg.width); saved image is small(size like image control) but I need to save image with original size. With var data:BitmapData = Bitmap(currImg.content).bitmapData; it worked

View 2 Replies

Web Development :: Saving Image Out From Beneath Mask From Within Sprite

May 31, 2011

I've got a sprite object that gets a custom shape loaded into it, that gets used as a mask so as to cut out a custom shape from an image that is loaded in with a loader object - The loader(loada) and shape(lines) objects are both children of the sprite object - I've added code to save out the image from beneath the mask but when the save function is called nothing is saved out, and no errors are thrown.[code]

View 1 Replies

Flex :: Upload Image Then Share Without Saving The File Using SharedObject Or Anything?

Jun 10, 2011

I'm currently working on a chat with uploading an image and sharing it. The problem is I can upload and display the image but I can't share it to the other side. Here is some code:

[Code]...

View 1 Replies

Flex :: Saving And Loading Image To Local SQLite BLOB ?

Sep 8, 2011

I need to be able to save and load images into an SQLite database using Flex 4.5 for a mobile application. The use case is this:

Inside the view there is a spark Image object with a URL as a source

When user clicks button, the Image is saved to an SQLite db inside a BLOB field.

In a separate Image, the source is set to the ByteArray stored in the db.

The biggest question so far is this: where do I get the ByteArray for a loaded Image? I've tried debugging and inspecting Image, BitmapImage, and BitMapData but there's no sign of the byte array.... perhaps it's inside the ContentLoader? But that's null unless I enable caching.

I've done some research and there are no complete examples for how to handle this. I've written a simple View that anyone can copy and paste into a new project. It will compile without errors and can be used for testing. I will update this code as I get the answers I need so that anyone can have a fully working example of this workflow.The only caveat: I used a synchronous connection to the DB to avoid complicating the code with event handlers, I wanted to keep it as simple as possible.I will only mark this question as answered once it is fully functioning both ways.

UPDATE SEPT. 09 2011: The code below is now fully functioning in both directions (save and load). Here are some of the things I've learned: It turns out that the ByteArray of a spark Image can be found inside the LoaderInfo of the image itself. Like this:

image.loaderInfo.bytes

However, trying to set this ByteArray as the source of another image ( image2.source = image1.loaderInfo.bytes) results in this security error: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.Which is too bad because it would save so much time and processing power.the workaround is to encode the ByteArray using either a JPEGEncoder or a PNGEncoder. I used the JPEGEncoder which produces much smaller files. Here's how:

var encoder:JPEGEncoder = new JPEGEncoder(75);
var imageByteArray:ByteArray = encoder.encode(imageToSave.bitmapData);

Now the problem is saving these bytes to the DB. Saving them as they are now will not work once we read them out, I'm not sure why. So the solution is to encode them into a base64 string like this:

var baseEncoder:Base64Encoder = new Base64Encoder();
baseEncoder.encodeBytes(imageByteArray);
var encodedBytes:String = baseEncoder.toString();

So now just save that string into the BLOB field and later read it out. However, you have to decode it from a base64 string to a ByteArray like this:

var encodedBytes:String = result.data[0].imagedata;
var baseDecoder:Base64Decoder = new Base64Decoder();
baseDecoder.decode(encodedBytes);
var byteArray:ByteArray = baseDecoder.toByteArray();

Now assign the bytearray as the source of your image and you're done. Simple right?if you find any optimizations or alternative ways to do this.I will respond and keep this code updated if need be.

View 2 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







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