How to deal with pixel-per-pixel operations?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, I'm starting to write a GIMP plugin and I'm facing the problem of "pixel-per-pixel" algorithms and their speed.
Without going on details, my algorithm should take every pixel in the image and for each one it must check its 24 neighbours, it does some simple calcs and finally it set a new color for the pixel.

How to speed-up the execution? I tried with the easiest approach with a classic "for-in-for" loop but the computation is really slow. Looking around, I've seen some GIMP functions like:

gimppixelfetcher — Functions for operating on pixel regions.
gimppixelrgn — Functions for operating on pixel regions.
gimpregioniterator — Functions to traverse a pixel regions. 

Can they help me? I can't actually understand well how they work because the GIMP-dev reference is incomplete in several parts...
Is there, maybe, some code snippets or tutorial about this problem?

Thank you for your support,
Ale
 		 	   		  
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gimp-developer-list





[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux