CSC 195.01 2013S Technologies for Mediascripting
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Disabilities]
[Instructions]
[Teaching and Learning]
Groups:
[Handouts]
[Outlines]
(Current Outline)
[EBoards]
(Current EBoard)
[Examples]
Misc:
[SamR]
[EBook]
[GNU Coding Standards]
Back to Class 09: GIMP Internals (1): GIMP Plug-Ins. On to Class 11: GIMP Internals (3): The Procedural Database.
This outline is also available in PDF.
Held: Thursday, 11 April 2013
Summary: We consider plug-ins that manipulate images at the pixel level.
Related Pages:
Notes:
Overview:
grep to look for details in headers.
/usr/include/gimp-2.0/libgimp/gimp.h.
context-update-displays!. But the
underlying PDB function is gimp-displays-flush.
gimp_displays_flush ();
run is a void function.
run succeeded?
return_vals parameter.
static GimpParam results[1]; results[0].type = GIMP_PDB_STATUS; results[0].data.d_status = GIMP_PDB_SUCCESS; *nreturn_vals = 1; *return_vals = results;
image-compute involves computing a color for each pixel
gimp-drawable-get-pixel and
gimp-drawable-set-pixel
GimpPixelRgn struct (which you can get
from a drawable id) along with
gimp_pixel_rgn_get_pixel and gimp_pixel_rgn_set_pixel
GimpPixelRgn struct (which you can get
from a drawable id) along with
gimp_pixel_rgn_get_row and gimp_pixel_rgn_set_row (ro col, or rect)
GimpPixelRgn struct, but let the GIMP tell you
which portions tohandle.
gimp_drawable_flush (drawable_id); gimp_drawable_merge_shadow (drawable_id, TRUE); gimp_drawable_update (drawable_id, left, top, width, height);
gimp_pixel_rgns_register to start the iteration.
That makes regions point to the first tile in their respective drawables.
gimp_pixel_rgns_process to advance them
gpointer pr;
pr = gimp_pixel_rgns_register (2, &source_region, &target_region);
while (pr != NULL)
{
// Do work
...
// Move on to the next tile
pr = gimp_pixel_rgns_process (pr);
} // while
gimp_pixel_rgn_get_pixel and
gimp_pixel_rgn_set_pixel. But that turns out to be slow.
[Skip to Body]
Primary:
[Front Door]
[Schedule]
-
[Academic Honesty]
[Disabilities]
[Instructions]
[Teaching and Learning]
Groups:
[Handouts]
[Outlines]
(Current Outline)
[EBoards]
(Current EBoard)
[Examples]
Misc:
[SamR]
[EBook]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed May 1 10:51:45 2013.
The source to the document was last modified on Mon Jan 21 13:59:23 2013.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC195/2013S/outline.10.html.
You may wish to
validate this document's HTML
;
;
http://creativecommons.org/licenses/by-nc/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.