|
|||||||||||||
|
Playing with the .PPM format (25 July 2002) While experimenting with the Gimp I came across this bitmap format. The brilliant thing about this format is the simplicity of the file.: For example the file test.ppm P3 5 5 256 0 0 0 0 0 0 .... 0 0 0 (with 25 sets of 0 0 0) will create picture, with 5x5 pixels and with 256 colour depth. If you wish to convert this to a .jpg format simply axecute the command: # ppmtojpeg test.ppm > test.jpeg and it's done! I even went a bit further and wrote a tiny program in C++ that create random images. Here is the code: #this program will create a 100x100 pixel image
![]()
It does look random, doesn't it?
The main dissadvantage of the .ppm format is the size of the file: it can be 20-30 times bigger than a typical jpeg. |
||||||||||||
Copyright 2002: D Mitsinikos - if you wish to copy parts of my website,
by all means do, but please include my name and my web address |