I would like to know if it could be possible to convert an swf file, with his flashvars to a bitmap image. But all that in PHP, is it possible ? I precise that I would like to do it several times, and that the .swf file is not mine (is not on my site, I take it from a other site).
I allready thank you for your answers ! :)
I think the closest you will get is with SWFTOOLS: http://www.swftools.org/
It can extract bitmaps and flashvars. There are windows and linux binaries available so you'll have to run it from the commandline, that should not be a problem. The main problem of converting an swf to jpeg is that a lot of flash files require execution of ActionsScript in order to show something usefull, and then still you have to have the right frame, so it might not be so straightforward.
So my answer would be: Yes, it might be possible if the movie is very simple and only consists of simple bitmaps. But also no: for most swf's it will be very difficult without a flash client and screenshot capabilities if you really need the output of the movie.
Related
I am trying to make project of a web app that will check the colour of the PDF document. My preferred language is PHP.
At the begining I've been thinking about GD, but this only refer to images (jpg, png, gif). Nothing for PDF. For images I am going to use some method similar to this: Get image color.
So does anyone know some method, library (opensource), or something else to make such app? I can't find any examples on the web.
You'll probably be best off converting the PDF into an image, and then using the same method you're using for images. In addition to being easy to do, that will also guarantee consistent results.
However, converting a PDF file to an image is not something that PHP alone is well-equipped to do. The best way to go is the ImageMagick based approach as described in this question. It gives a number of alternatives, too.
Is there some library to generate a video from pictures and text? Something like animoto.com does but much simplier.
I basically want to set one picture, and fade in and out text over that picture and make a video out of that.
I am looking for something to run from php or python, video format is not so important.
Would you consider an animated GIF to be a video? If so use imagemagick!
There is a pyffmpeg module at http://code.google.com/p/pyffmpeg/ which ought to be able to do this; I'll see if I can bash together an example.
Edit: ok, I take it back. It doesn't look like pyffmpeg is being actively maintained, and I've just about had an aneurysm trying to get the son-of-a-gun to build on Windows (there's a binary download for 2.6, but none for 2.7). Apparently the preferred method is to cross-compile it from Ubuntu (?!) It may be fine if you're on Linux, but on Windows I'm throwing in the towel.
I don't know how to do this and I was wondering if someone smart could give me an example :)
I want someone to be able to post a png,jpg, or bmp image url and then id use PHP GD to duplicate the image including width and height.
Could someone give me an example of this? Also id like it to support only png, jpeg, and bmp.
I would, in the script, download the URL first (check out PHP cURL), and then attempt to read in the file using GD.
http://php.net/manual/en/book.curl.php
http://php.net/manual/en/book.image.php
You can do a simple regex (something like /^.*\.(jpg|jpeg|png|gif)$/i) on the URL, but URLs don't always represent the type of file you get. Depending on what you need, it might be better to download first and ask questions later.
I have an MP3 file uploader. I want to add an additional audio track to the file upon upload via PHP. Is that possible?
I say "Yes, it's possible".
The following seems to make it seem almost trivial: "How to Merge / Concatenate MP3s with PHP"
(based on comments)
It's not possible, well not directly possible. Not with just PHP.
With PHP you could break up a Mp3 and insert your own little snippet into pauses, but it probably won't sound very good, and if I am thinking correctly will result in lowered audio quality.
To really achieve what you want you would need something inbetween to process the Mp3 files. More than likely it would be a Unix shell script attached to some program or library that can do this, executed by PHP.
I'm looking for a script that will generate jpg thumbnails on the fly (in php) from a swf file. Does anyone know where I can find something like this?
Go ahead chek out the Flash Bitmap class~ a bunch of amazing stuff can be done with it~~!!!
Check out the examples and sources here by Andrew Trice of Cynergy (the last few ones)
http://www.cynergysystems.com/blogs/page/andrewtrice?entry=flex_2_bitmapdata_tricks_and
The main idea is to get the bitmap data and send to PHP GD library to create the images.
another option look at :
http://ffmpeg-php.sourceforge.net/
i take it from link :
http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_22400739.html