Thanks! A few comments:

On 11/10/2010 02:02 AM, Patrick Horgan wrote:
> +  if(fread (header, 1, 8, infile)!=8)

No magic numbers please, use a define for at least 8

> +      g_warning ("%s is not a valid png file", path);

You should give a more detailed error message than just "is not valid"

> +  if(fread (header, 1, 8, infile)!=8)
> +    {
> +      fclose (infile);
> +      g_warning ("%s is not a valid png file", path);
> +      return -1;
> +    }

Instead of duplicating this code from above, it would be better to put 
it in a helper function

  / Martin


-- 

My GIMP Blog:
http://www.chromecode.com/
"Nightly GIMP, GEGL, babl tarball builds"
_______________________________________________
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer

Reply via email to