On Sat, May 21, 2011 at 12:03 PM, Daniel Hiepler <rigid@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi, > > what would be the best-practice to check if two BablFormats are the > same? I would need something like: > > Babl *format1 = babl_format("R'G'B' u8"); > Babl *format2 = babl_format("CIE Lab float"); > > if(is_same_format(format1, format2)) if (format1 == format2) { ... } else { ... } But do note that internally babl will provide you with a memcpy instead of a conversion if the passed in formats are the same; thus this should only be neccesary if direct access with no copies whatsoever is an option where used. > { ... } else { ... } > Also I would need to get the current source- and destination-format of > a fish. > > Is that possible? BablFishes never change their source nor destination formats, and at the moment the source and destination formats of fishes are not exposed bu the publicly installed headers for babl. /Øyvind K. -- «The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ ; http://ffii.org/ _______________________________________________ Gegl-developer mailing list Gegl-developer@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer