|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Scale
Scale is an algorithm to alter the size of an image
code.iface.scale
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
Scale()
|
Method Summary | |
int[] |
getrect(int[] src,
int src_width,
int x,
int y,
int width,
int height)
Give an image of width src_width contained in int array src returns the rectangle with top left corner at x,y and with width width and height height contained in that image as an int array |
int[] |
grow_interpolate(int[] src,
int orig_w,
int orig_h,
int scalefactor)
Grows an image by a factor of scalefactor using the interpolate method |
int[] |
grow_replicate(int[] src,
int orig_w,
int orig_h,
int scalefactor)
Grows an image by a factor of scalefactor using the replicate method |
int[] |
shrink_average(int[] src,
int orig_w,
int orig_h,
int scalefactor)
Reduces an image by a factor of scalefactor using the average method |
int[] |
shrink_sample(int[] src,
int orig_w,
int orig_h,
int scalefactor)
Reduces an image by a factor of scalefactor using the sample method |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
run,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Scale()
Method Detail |
public int[] getrect(int[] src, int src_width, int x, int y, int width, int height)
src
- The input image arraysrc_width
- The width of the input image arrayx
- The x co-ordinate of the top left corner of the rectangley
- The y co-ordinate of the top left corner of the rectanglewidth
- The width of the rectangleheight
- The height of the rectanglepublic int[] shrink_sample(int[] src, int orig_w, int orig_h, int scalefactor)
src
- The input image arrayorig_w
- The width of the input imageorig_h
- The height of the input imagescalefactor
- The amount the image is to be shrunkpublic int[] shrink_average(int[] src, int orig_w, int orig_h, int scalefactor)
src
- The input image arrayorig_w
- The width of the input imageorig_h
- The height of the input imagescalefactor
- The amount the image is to be shrunkpublic int[] grow_replicate(int[] src, int orig_w, int orig_h, int scalefactor)
src
- The input image arrayorig_w
- The width of the input imageorig_h
- The height of the input imagescalefactor
- The amount the image is to be grownpublic int[] grow_interpolate(int[] src, int orig_w, int orig_h, int scalefactor)
src
- The input image arrayorig_w
- The width of the input imageorig_h
- The height of the input imagescalefactor
- The amount the image is to be grown
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |