directories and to enable/disable drivers.
- added simple examples to most of the filters documented in
Imager::Filters
-- calculate the sum of the coefficients once rather than for every
- pixel in i_conv() (convolution filter)
- explicitly document there are no PNG specific tags.
- more examples in Imager::Draw
- minor cleanup of Imager::Fill
center=(len-1)/2;
- pc = 0.0;
- for (c = 0; c < len; ++c) {
- pc += coeff[c];
- }
-
+ /* don't move the calculation of pc up here, it depends on which pixels
+ are readable */
for(l=0;l<im->ysize;l++) {
for(i=0;i<im->xsize;i++) {
+ pc=0.0;
for(ch=0;ch<im->channels;ch++) res[ch]=0;
for(c=0;c<len;c++)
if (i_gpix(im,i+c-center,l,&rcolor)!=-1) {
for(ch=0;ch<im->channels;ch++)
res[ch]+=(float)(rcolor.channel[ch])*coeff[c];
+ pc+=coeff[c];
}
for(ch=0;ch<im->channels;ch++) {
double temp = res[ch]/pc;
{
for(i=0;i<im->ysize;i++)
{
+ pc=0.0;
for(ch=0;ch<im->channels;ch++) res[ch]=0;
for(c=0;c<len;c++)
if (i_gpix(&timg,l,i+c-center,&rcolor)!=-1)
{
for(ch=0;ch<im->channels;ch++)
res[ch]+=(float)(rcolor.channel[ch])*coeff[c];
+ pc+=coeff[c];
}
for(ch=0;ch<im->channels;ch++) {
double temp = res[ch]/pc;