On Monday 25 February 2002 3:48 pm, Dekel Tsur wrote:
> Don't try to code it your self. Just grab the code from some GPL project.
Two reasons not to:
1. "simple" cropping, rotation, scaling is easy and "simple" is enough for
GImageXPM which is just a proof of concept image loader. The real image
On Mon, Feb 25, 2002 at 01:49:35PM +, Angus Leeming wrote:
> > The principle behind scaling is simple: It's raytracing.
> >
> > So, for each destination pixel, calculate which pixel it corresponds
> > to in the source picture.
>
> Ok, the idea is easy enough. The devil, as they say, is in th
On Monday 25 February 2002 1:49 pm, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
>
> | On Monday 25 February 2002 11:22 am, Lars Gullik Bjønnes wrote:
> >> Angus Leeming <[EMAIL PROTECTED]> writes:
> >> | My question. Should I use c or c++ style casts with malloc. This:
On Monday 25 February 2002 1:36 pm, Asger K. Alstrup Nielsen wrote:
> On Mon, 25 Feb 2002, Angus Leeming wrote:
>
> > void GImageXPM::scale(GParams const & params)
> > {
> > if (!xpm_image_)
> > return;
> >
> > }
>
> The principle behind scaling is simple: It's raytracing.
>
> S
On Mon, 25 Feb 2002, Angus Leeming wrote:
> void GImageXPM::scale(GParams const & params)
> {
> if (!xpm_image_)
> return;
>
> }
The principle behind scaling is simple: It's raytracing.
So, for each destination pixel, calculate which pixel it corresponds
to in the source pic
On Monday 25 February 2002 11:22 am, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> | My question. Should I use c or c++ style casts with malloc. This:
> the C++ variant.
Done
> Would be nice if you coult wrap the use of malloc and XpmFreeXpmImage
> in a RAII object.
When rotating the image I sometimes have to add a color "none" to the
XpmImage color table. Since this struct is controlled by libXPM, I use malloc
rather than new, so that XpmFreeXpmImage(XpmImage *) works correctly.
My question. Should I use c or c++ style casts with malloc. This:
new_xpm->c