Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Cropping, Zooming, and Rotating uploaded images using Flash and php and then saving the manipulated image.

How do you take an uploaded image (we are uploading using Php script) that is loaded into a flash movie and save a manipulated version of that image that was cropped, rotated, and/or zoomed in or out (user has control of manipulation) to the server?

In a more detailed version of that question we are trying to allow people to upload images on our website (we have this done).

Once the image is uploaded it is loaded into a flash movie (we can figure this out as well)

Then the user uses a flash movie to crop, rotate, and zoom in or out of the image. Once they have selected how they want to manipulate the image we need to be able to save that to the server. A good example of what we are trying to accomplish is found at http://www.serversidegroup.com/ (click launch demo to view the example) They are uploading images into flash and cropping, rotating, and zooming. The big question is how are they then saving the image?

Do you pass variables to php from flash to crop, rotate, and zoom to get a final image? If so what are the commands to do so?
Do you manipulate the image within flash and then have the flash movie save to the server the manipulated image?

Or is it something totally different?

Any help would be greatly appreciated!
0
mblyman
Asked:
mblyman
  • 4
  • 4
1 Solution
 
David BruggeCommented:
What will be done with the image once it has been manipulated on screen? If the image is static and the resolution is the same as appears on screen, I would think that a simple screen grab might me a possible solution.

However-
If the screen image is only a representation such as was shown in the demo i.e. Uploading a 800px x 500px causes a 250 x 150 image to appear on screen. The implication is that you are going to order a card that uses the full resolution of the original to print the card.
If this is the case, it is similar to the way we used to work on huge graphics files back in the dark ages.

It would take thirty minutes to an hour to rotate a big file and do a screen redraw. And then you might not like the results and want to change it back. Or maybe you rotated too much and had to adjust.

We would down sample the image severely and manipulate that. We could flip, rotate, skew, etc. We just had to keep a log of the changes. (Flash can do this pretty nicely I should think, without a log) We then used the final settings from the log to manipulate the large image. We would plug in our settings and let the image crank overnight.

Something similar might be employed. (but without the waiting, but with post processing)

The demo had three variables. Zoom, rotation (in increments of 90 degrees) and X Y placement. It would be fairly straight forward to save those setting and apply them to the uploaded image.
0
 
mblymanAuthor Commented:
D_Brugge,

You are correct in thinking that the uploaded image is basically going to be resampled to a smaller size and manipulated in the flash movie. To answer your question about what happens after manipulation is that we want to be able to take the variables from the end user and manipulate the full quality graphic and then save that manipulated image on the server to be printed with an order.

I like your idea of having flash pass out the variables of what needs to be done to the image. Two questions still remain unanswered. 1) what  do we use to manipulate the image based on the variables passed out of flash. We are anticipating hundreds of these every day and want to have an automated process that creates these manipulated images.

2) Because we are going to have large quantities of photo maipulations occuring what are the processing times and server loads involved with doing this. You mentioned that it use to take 30 minutes to manipulate graphics. If we do hundreds or even thousands a day what is the load going to be on our server.
0
 
David BruggeCommented:
The time constraints on a single image are not a problem. We were working on files in the 500 to 600 MB range. You won't get any of those uploaded on the internet. (grin!)

I would say Photoshop would be your best bet. You can program a script using java or Visual Basic that will read a database and apply the parimiters and save a copy. You might have to get several programs running depending on the load, but my guess that working on a typical size uploaded file, a fast machine can just about run even with your prints. (I'm thinking just a few minutes per image) You might also have to have a quality control inspector lwatching thumbnails for exceptions before they reach the print stage.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
mblymanAuthor Commented:
I've heard of people using image magick to manipulate images from a server based level. Any thoughts? Also we are thinking of using the same server that is running our websites to do the image processing. If we used something like image magick to manipulate images would it take a few minutes of processing to do each one? We are thinking contraining upload size to under 3 MB per picture and have a min px width of at least 400 px.
0
 
David BruggeCommented:
Yes, I think Imagemagik would be a great application. I didn't mention it because not that many people are aware of it and it tends to be intimidating. I have not done more than dabble with it, but I have friends that swear by it.
What resolution do you print at? If you are limiting file size to 3M, and width to 400 pix, that would leave a height of 1200 pixels before you reach the 3M size (with 16bit RGB images)
If you are outputting at say 150 dpi, your 400 pixel limit will make images just 2 and a quarter inches wide.
0
 
mblymanAuthor Commented:
We are going to be printing closer to 300 dpi and we only need images that are around 1.5" square so we don't need very large images. We started working with image magick today and things look good. We have read that using imagemagick with php code slows down the processing and efficiency of the processing. Any thoughts on ways around this or insight on the command lines we could use in image magick?

Thanks
0
 
David BruggeCommented:
Sorry, I don't have enough experience myself to give you solid advice on that. Like I said, I've only dabbled with ImageMagic a little, and I've been out of the printing part of the industry for several years. You might post a question with ImageMagick in the header and see if it gets some hits.
Good luck!
0
 
mblymanAuthor Commented:
Thanks I'll do that if need.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now