All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.annotations.providers.img.ImageWriterParams Maven / Gradle / Ivy

There is a newer version: 4.0.0.Beta5
Show newest version
package org.jboss.resteasy.annotations.providers.img;

import javax.imageio.ImageWriteParam;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * An annotation that a resource class can use to pass parameters
 * to the {@link org.jboss.resteasy.plugins.providers.IIOImageProvider}.
 *
 * @author Ryan J. McDonough
 * @version $Revision: $
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface ImageWriterParams
{

   /**
    * Specifies the compression quality of the image being written. By
    * default, the highest compression level is used. A float value
    * between 0.0f and 1.0f are acceptable. The default value is 1.0f;
    *
    * @return compression quality
    */
   float compressionQuality() default 1.0f;

   /**
    * Specifies the compression mode for the output image. By default,
    * it uses {@link javax.imageio.ImageWriteParam#MODE_COPY_FROM_METADATA}.
    *
    * @return compression mode
    */
   int compressionMode() default ImageWriteParam.MODE_COPY_FROM_METADATA;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy