Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 3.5

COLUMN

The Missing Picture class

Issue: 3.5 (May/June 2005)
Author: Didier Barbas
Author Bio: Didier has been a dilettante programmer and linguist for more than 20 years. Unusual for a Frenchman, he speaks 11 languages, including Korean and PowerPC machine-language.
Article Description: No description available.
Article Length (in bytes): 8,797
Starting Page Number: 46
Article Number: 3521
Resource File(s):

Download Icon 3521.zip Updated: 2005-05-18 09:07:24

Related Web Link(s):

http://effbot.org/downloads/#Imaging
http://effbot.org/zone/pil-toc.htm

Excerpt of article text...

When building console applications, we may not use instances of the Picture class. This restriction is imposed by some requirements that would make compiling Picture-enabled console applications a nightmare, or so I gather. Thus, until Mars Saxman and the other voodoo artists at REAL Software come up with a solution, we are out on a limb. So far, the best solution I have found is to use PIL, Python's Imaging Library. There are other solutions, like using ImageMagick (which I have used quite a bit, and like), but so far the only one I found that gave access to the innards of the image, while providing a fair number of manipulation functions, is PIL. Besides, all solutions are external and require us to install libraries (unless you want to write your own class in pure RB), so in the end, it's a matter of choice, really. So this column will be about integrating PIL within RB, at least on Mac OS X. PIL exists on Windows -- I understand the author is actually more Windows-oriented than I'll ever be -- so I suppose that the provided sample project is usable, with some modifications, on Windows. Linux users should be all right, although I have yet to test it.

Objectives

The principal objective is to provide a custom class that will behave, to the outsider, as much as possible like RB's native Picture class -- that is, in the GUI app version. Whatever black magic we use to have RB and PIL work together, it should be transparent.

We won't be able to provide a fully functional Picture class in the space of this column, but we can give it our best effort, and fill in the blanks later. The idea for this issue is to put in place the structure that will enable such a class.

Requirements

...End of Excerpt. Please purchase the magazine to read the full article.