We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
File Formats. (Read 654 times)
File Formats.
Jun 30th, 2006, 5:21pm
 
Hello, all.

I've just started getting into the world of Processing programming, just a few queries.

Why doesn't Processing support .bmp (bitmap) file format?
Why doesn't Processing support .ttf (font) file format?

I'm doubting if I can actually write executables files using this software.

Thanks in advance from, Jono.

void setup() {
 size(240,160);
 loadFont("Lucida_Console.ttf");
}

:\
Re: File Formats.
Reply #1 - Jul 1st, 2006, 8:28pm
 
The Geomerative library includes TrueType support.

Processing contains all of the functionality you'd need to implement support for any sort of file format. If you would like to import BMP files (or write them), you merely need to implement the format parser yourself.

wotsit.org is a good site for finding the documentation for file formats. There are 4 listings for the BMP file format under the Graphics Files category.

It is probably easier, though, to convert the files using a different program and use something else. BMPs are bloated and archaic... I can't imagine any advantage they'd have over anything else. PNGs are natively supported and are a much more favorable format, with lossless compression, full colors, and 8-bit transparency.

The language strives to provide many useful functions, but it is not possible for them to implement every file format that people may want, and patents may restrict them from doing so. The same goes for other features too, e.g. I want to make a chess game, where is the chess() function
Re: File Formats.
Reply #2 - Apr 11th, 2007, 3:44pm
 
Thank-o-Mat!

After a couple of years of coding my own animation render engine, i now seem to have found a new home. real support for vector fonts was crucial to me for composing audiovisualz.
Re: File Formats.
Reply #3 - Apr 11th, 2007, 5:19pm
 
also read the reference:
http://processing.org/reference/loadFont_.html
http://processing.org/reference/createFont_.html

it explains how loadFont works, and how to use createFont to load a ttf.
Page Index Toggle Pages: 1