Lines Matching refs:image
2 * Copyright (c) 1999-2000 Image Power, Inc. and the University of
13 * Copyright (c) 1999-2000 Image Power, Inc.
65 * Image Class
95 /* The threshold at which image data is no longer stored in memory. */
120 /* Image coordinate. */
133 * Image class and supporting classes.
136 /* Image component class. */
181 /* Image class. */
186 /* The x-coordinate of the top-left corner of the image bounding box. */
189 /* The y-coordinate of the top-left corner of the image bounding box. */
192 /* The x-coordinate of the bottom-right corner of the image bounding
196 /* The y-coordinate of the bottom-right corner of the image bounding
203 /* The maximum number of components that this image can have (i.e., the
258 /* The maximum number of image data formats supported. */
260 /* Image format-dependent operations. */
265 /* Decode image data from a stream. */
267 int (*encode)(jas_image_t *image, jas_stream_t *out, char *opts);
268 /* Encode image data to a stream. */
275 /* Image format information. */
297 * Image operations.
300 /* Create an image. */
304 /* Create an "empty" image. */
307 /* Clone an image. */
308 jas_image_t *jas_image_copy(jas_image_t *image);
310 /* Deallocate any resources associated with an image. */
311 void jas_image_destroy(jas_image_t *image);
313 /* Get the width of the image in units of the image reference grid. */
314 #define jas_image_width(image) \
315 ((image)->brx_ - (image)->tlx_)
317 /* Get the height of the image in units of the image reference grid. */
318 #define jas_image_height(image) \
319 ((image)->bry_ - (image)->tly_)
321 /* Get the x-coordinate of the top-left corner of the image bounding box
323 #define jas_image_tlx(image) \
324 ((image)->tlx_)
326 /* Get the y-coordinate of the top-left corner of the image bounding box
328 #define jas_image_tly(image) \
329 ((image)->tly_)
331 /* Get the x-coordinate of the bottom-right corner of the image bounding box
333 #define jas_image_brx(image) \
334 ((image)->brx_)
336 /* Get the y-coordinate of the bottom-right corner of the image bounding box
338 #define jas_image_bry(image) \
339 ((image)->bry_)
341 /* Get the number of image components. */
342 #define jas_image_numcmpts(image) \
343 ((image)->numcmpts_)
345 /* Get the color model used by the image. */
346 #define jas_image_clrspc(image) \
347 ((image)->clrspc_)
349 /* Set the color model for an image. */
350 #define jas_image_setclrspc(image, clrspc) \
351 ((image)->clrspc_ = (clrspc))
353 #define jas_image_cmpttype(image, cmptno) \
354 ((image)->cmpts_[(cmptno)]->type_)
355 #define jas_image_setcmpttype(image, cmptno, type) \
356 ((image)->cmpts_[(cmptno)]->type_ = (type))
359 #define jas_image_cmptwidth(image, cmptno) \
360 ((image)->cmpts_[cmptno]->width_)
363 #define jas_image_cmptheight(image, cmptno) \
364 ((image)->cmpts_[cmptno]->height_)
367 #define jas_image_cmptsgnd(image, cmptno) \
368 ((image)->cmpts_[cmptno]->sgnd_)
371 #define jas_image_cmptprec(image, cmptno) \
372 ((image)->cmpts_[cmptno]->prec_)
375 #define jas_image_cmpthstep(image, cmptno) \
376 ((image)->cmpts_[cmptno]->hstep_)
379 #define jas_image_cmptvstep(image, cmptno) \
380 ((image)->cmpts_[cmptno]->vstep_)
383 #define jas_image_cmpttlx(image, cmptno) \
384 ((image)->cmpts_[cmptno]->tlx_)
387 #define jas_image_cmpttly(image, cmptno) \
388 ((image)->cmpts_[cmptno]->tly_)
392 #define jas_image_cmptbrx(image, cmptno) \
393 ((image)->cmpts_[cmptno]->tlx_ + (image)->cmpts_[cmptno]->width_ * \
394 (image)->cmpts_[cmptno]->hstep_)
398 #define jas_image_cmptbry(image, cmptno) \
399 ((image)->cmpts_[cmptno]->tly_ + (image)->cmpts_[cmptno]->height_ * \
400 (image)->cmpts_[cmptno]->vstep_)
402 /* Get the raw size of an image (i.e., the nominal size of the image without
404 uint_fast32_t jas_image_rawsize(jas_image_t *image);
406 /* Create an image from a stream in some specified format. */
409 /* Write an image to a stream in a specified format. */
410 int jas_image_encode(jas_image_t *image, jas_stream_t *out, int fmt,
413 /* Read a rectangular region of an image component. */
416 int jas_image_readcmpt(jas_image_t *image, int cmptno,
420 /* Write a rectangular region of an image component. */
421 int jas_image_writecmpt(jas_image_t *image, int cmptno,
425 /* Delete a component from an image. */
426 void jas_image_delcmpt(jas_image_t *image, int cmptno);
428 /* Add a component to an image. */
429 int jas_image_addcmpt(jas_image_t *image, int cmptno,
432 /* Copy a component from one image to another. */
441 #define jas_image_cmptdtype(image, cmptno) \
442 (JAS_IMAGE_CDT_SETSGND((image)->cmpts_[cmptno]->sgnd_) | JAS_IMAGE_CDT_SETPREC((image)->cmpts_[cmptno]->prec_))
444 int jas_image_depalettize(jas_image_t *image, int cmptno, int numlutents,
447 int jas_image_readcmptsample(jas_image_t *image, int cmptno, int x, int y);
448 void jas_image_writecmptsample(jas_image_t *image, int cmptno, int x, int y,
451 int jas_image_getcmptbytype(jas_image_t *image, int ctype);
454 * Image format-related operations.
457 /* Clear the table of image formats. */
460 /* Add entry to table of image formats. */
464 /* Get the ID for the image format with the specified name. */
467 /* Get the name of the image format with the specified ID. */
470 /* Lookup image format information by the format ID. */
473 /* Lookup image format information by the format name. */
476 /* Guess the format of an image file based on its name. */
479 /* Get the format of image data in a stream. */
483 #define jas_image_cmprof(image) ((image)->cmprof_)
484 int jas_image_ishomosamp(jas_image_t *image);
485 int jas_image_sampcmpt(jas_image_t *image, int cmptno, int newcmptno,
488 int jas_image_writecmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x,
491 int jas_image_readcmpt2(jas_image_t *image, int cmptno, jas_image_coord_t x,
495 #define jas_image_setcmprof(image, cmprof) ((image)->cmprof_ = cmprof)
496 jas_image_t *jas_image_chclrspc(jas_image_t *image, jas_cmprof_t *outprof,
498 void jas_image_dump(jas_image_t *image, FILE *out);
501 * Image format-dependent operations.
507 int jpg_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
514 int mif_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
521 int pnm_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
528 int ras_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
535 int bmp_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
542 int jp2_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
549 int jpc_encode(jas_image_t *image, jas_stream_t *out, char *optstr);
556 int pgx_encode(jas_image_t *image, jas_stream_t *out, char *optstr);