Processing – What is the fastest way to generate an animated .gif-file out of Processing 2? - processing

i am not shure, if there are many Processing-people inside Stackoverflow, anyway:
What is the fastest way to generate an animated .gif-file out of Processing 2?
Thanks in advance!

You've got a couple of options:
Use the gifAnimation library
Save an image sequence from Processing, then encode a gif with an external tool (like ImageMagick,GIMP, Photoshop, etc.)
Also check out this answer for more details

George's answer is correct if you want to do this programatically, and it's what you should do if you care about gif quality.
Another quick and dirty alternative is to capture your screen directly.
I use a tool called ScreenToGif. You can record your sketch directly, without any exporting or encoding on your end.
Here is another question with a bunch of similar tools.

Related

find similar image in library to photo

I work at a printer where we generate thumbnails of artwork for orders and store them in a folder before printing.
I'm looking for a code library that will allow us to take a photo of a printed item and look through the library of thumbnails for the design.
Just wondered if anyone knows of a library or api that could do this?
Thanks
David
pHash is one solution.
There are others but that mainly depends on your requirements: do you only want to identify identical images, if not, what types of transformations do you want to be able to capture etc.
In general you should look for near duplicate image search.
#david-jennings there are numerous methods to look for similar images in libraries. Remember that google already does this in google images.
Your problem falls under the scope of Content Based Image Retrieval (CBIR), which aims at looking for images with similarities in their content. MPEG-7 is a standard established many years ago to address these issues and the research field is very active with new techniques being developed constantly.
The main idea in CBIR is to extract some kind of a signature from an image and try to match it with all previously extracted signatures of all images in your database. Which method to use depends upon the specifics of your problem... According to your initial post I suppose that probably the use of SHIFT is going to do the work for you...
You may implement such a system using OpenCV with C/C++/Java/etc., or something more "scientific" using MATLAB.

How can I take a look at my framebuffers?

As the title says, how can I verify if my framebuffers got rendered properly?
Is the best way to use glReadPixels and save the content to an image? If so, is there a simple open source library for doing this?
You can use gDebugger, it's best for the task. Allows to see buffers, textures, calls, states and lots of other useful information.

3D image comparison in TestComplete

HOw ot compare 3D image files in testcomplete. My application processes some 3D images i want it to be compared with the reference. Image file types are .spt, .vtk, .mdb ,.dcm.
Someone help me.
You can probably use checkpoints for this purpose. For example:
To verify an image displayed on screen, use a region checkpoint.
To verify the actual file that holds the image data, use a file checkpoint.
Well, for DICOM images you could think about converting those into bitmaps and have TestComplete compare the bitmaps. Admitted, there is one additional step that you have to take care of, and this is the choice of a (command line) tool that does the conversion for you. I think IrfanView does the job. Give it a try and post your results.

What is the difference between ImageMagick and libGD?

I don't know anything about either library but I have to choose one of them.
Which one whould you recommend?
I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to know which one is more powerful. I've read that libGD is not able to rotate text. Maybe there are some other drawbacks? Which one generates images faster? Whose API is easier to use?
according to this source, you should use GD:
GD and other modules built on top of that (like GD::Graph) are more aimed at producing "new" images like charts.
And you can read "Develop your own weather maps and alerts with Perl and GD", which is what you're looking for.
If you some some time. try them both, play a little, and decide.
I find both to be straightforward to use ImageMagick gives you a lot more power than gd. Here are two Magick examples from my posts:
How can I use IO::Scalar with Image::Magick::Read()
How can I resize an image to fit area with Image::Magick?
to give you examples of the API.
I have used GD to create a visualization.
See Script : giss-timeline-graphs.pl on that page.
imagemagick is more robust, however libGD should be able to cover most of the image generation tasks as well. you should see perl API/functions to both of these libraries to see what is more convenient for you.

Creating nice pdfs with ruby

I would like to create pdfs with ruby. One special need is embedding a picture into text (or a textblock), which means I need to be able to let the text flow around the image. E.g. the image should be in the rigth upper corner and the text should start left of the image and continue after the image by using the whole width of the page. How can I do this in ruby? Thank you for any suggestions!
In the past to get print quality PDFs in Ruby, I used rtex.
It's fast too, which is a real bonus.
Prawn to the rescue?
I like the html -> pdf approach. Although it is probably not the best option (prawn is) it makes it easy to design the pdf. See this website. You could also go for the approach documented at jimneath.org.
Good luck
iText is the heavyweight that will allow you to do anything you want with PDFs you can bridge to it with jRuby.
Another option I used was driving open office (it has a ui less option which you can automate from Ruby)
How about having Ruby generate some LaTeX code, then use pdflatex to produce the PDF?
Although I haven't done it myself I've seen people use a headless Open Office. You can control it from Ruby and use it to generate PDF files. You can even use an Open Office template and just fill in some elements into it.

Resources