Java Reference
In-Depth Information
Figure 7-31. Select Sharpen from the Process menu to sharpen the image.
IfyouweretoapplythesharpenkerneltoanARGBimage,whereallalphacompon-
ent values are 255/1.0, the destination image's alpha values would be the same as the
sourceimage'salphavalues.Thereasonisthatthesharpenkernelmultipliesthesource
pixel'salphavalueby4andsubtractsfourofitsneighbor'salphavaluesfromthemulti-
plied result, arriving at the source pixel's original alpha value.
Note Kernelswhoseelementssumto1.0preserveanimage'sbrightness,asdemon-
strated in the blur and sharpen kernels. Kernels whose elements sum to less than 1.0
generatedarkerimages,whichtheedgekerneldemonstrates.Kernelswhoseelements
sum to greater than 1.0 generate brighter images.
Using Lookup Tables
LookupOp letsyouprocessabufferedimage byusinglookuptables, wherealookup
table contains one or more arrays of values that are indexed by pixel component values.
Search WWH ::




Custom Search