Packages

 

com.aspose.cad.exif

Class JpegExifData

  • java.lang.Object
    • com.aspose.cad.exif.TiffDataTypeController
      • com.aspose.cad.exif.ExifData
        • com.aspose.cad.exif.JpegExifData


  • public final class JpegExifData
    extends com.aspose.cad.exif.ExifData

    EXIF data container for jpeg files.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int MAX_EXIF_SEGMENT_SIZE
      The maximum EXIF segment size in bytes allowed.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JpegExifData()
      Initializes a new instance of the JpegExifData class.
      JpegExifData(com.aspose.cad.fileformats.tiff.TiffDataType[] exifdata)
      Initializes a new instance of the JpegExifData class with data from array.
      JpegExifData(com.aspose.cad.fileformats.tiff.TiffDataType[] commonTags, com.aspose.cad.fileformats.tiff.TiffDataType[] exifTags, com.aspose.cad.fileformats.tiff.TiffDataType[] gpsTags)
      Initializes a new instance of the JpegExifData class with data from array.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      String getArtist()
      Gets or sets the artist.
      int[] getBitsPerSample()
      Gets or sets the bits per sample.
      int getCompression()
      Gets or sets the compression.
      String getCopyright()
      Gets or sets the copyright.
      String getDateTime()
      Gets or sets the date time.
      String getImageDescription()
      Gets or sets the image description.
      long getImageLength()
      Gets or sets the image length.
      long getImageWidth()
      Gets or sets the image width.
      String getModel()
      Gets or sets the model.
      int getOrientation()
      Gets or sets the orientation.
      int getPhotometricInterpretation()
      Gets or sets the photometric interpretation.
      int getPlanarConfiguration()
      Gets or sets the planar configuration.
      com.aspose.cad.fileformats.tiff.TiffRational[] getPrimaryChromaticities()
      Gets or sets the chromaticity of the three primary colors of the image.
      com.aspose.cad.fileformats.tiff.TiffRational[] getReferenceBlackWhite()
      Gets or sets the reference black white.
      int getResolutionUnit()
      Gets or sets the resolution unit.
      int getSamplesPerPixel()
      Gets or sets the samples per pixel.
      String getSoftware()
      Gets or sets the software.
      RasterImage getThumbnail()
      Gets or sets the thumbnail image.
      int[] getTransferFunction()
      Gets or sets the transfer function.
      com.aspose.cad.fileformats.tiff.TiffRational getXResolution()
      Gets or sets the x resolution.
      com.aspose.cad.fileformats.tiff.TiffRational[] getYCbCrCoefficients()
      Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.
      int getYCbCrPositioning()
      Gets or sets the position of chrominance components in relation to the luminance component.
      int[] getYCbCrSubSampling()
      Gets or sets the sampling ratio of chrominance components in relation to the luminance component.
      com.aspose.cad.fileformats.tiff.TiffRational getYResolution()
      Gets or sets the y resolution.
      byte[] serializeExifData()
      Serializes the EXIF data.
      void setArtist(String value)
      Gets or sets the artist.
      void setBitsPerSample(int[] value)
      Gets or sets the bits per sample.
      void setCompression(int value)
      Gets or sets the compression.
      void setCopyright(String value)
      Gets or sets the copyright.
      void setDateTime(String value)
      Gets or sets the date time.
      void setImageDescription(String value)
      Gets or sets the image description.
      void setImageLength(long value)
      Gets or sets the image length.
      void setImageWidth(long value)
      Gets or sets the image width.
      void setModel(String value)
      Gets or sets the model.
      void setOrientation(int value)
      Gets or sets the orientation.
      void setPhotometricInterpretation(int value)
      Gets or sets the photometric interpretation.
      void setPlanarConfiguration(int value)
      Gets or sets the planar configuration.
      void setPrimaryChromaticities(com.aspose.cad.fileformats.tiff.TiffRational[] value)
      Gets or sets the chromaticity of the three primary colors of the image.
      void setReferenceBlackWhite(com.aspose.cad.fileformats.tiff.TiffRational[] value)
      Gets or sets the reference black white.
      void setResolutionUnit(int value)
      Gets or sets the resolution unit.
      void setSamplesPerPixel(int value)
      Gets or sets the samples per pixel.
      void setSoftware(String value)
      Gets or sets the software.
      void setThumbnail(RasterImage value)
      Gets or sets the thumbnail image.
      void setTransferFunction(int[] value)
      Gets or sets the transfer function.
      void setXResolution(com.aspose.cad.fileformats.tiff.TiffRational value)
      Gets or sets the x resolution.
      void setYCbCrCoefficients(com.aspose.cad.fileformats.tiff.TiffRational[] value)
      Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.
      void setYCbCrPositioning(int value)
      Gets or sets the position of chrominance components in relation to the luminance component.
      void setYCbCrSubSampling(int[] value)
      Gets or sets the sampling ratio of chrominance components in relation to the luminance component.
      void setYResolution(com.aspose.cad.fileformats.tiff.TiffRational value)
      Gets or sets the y resolution.
      • Methods inherited from class com.aspose.cad.exif.ExifData

        getApertureValue, getBodySerialNumber, getBrightnessValue, getCameraOwnerName, getCFAPattern, getColorSpace, getCommonTags, getComponentsConfiguration, getCompressedBitsPerPixel, getContrast, getCustomRendered, getDateTimeDigitized, getDateTimeOriginal, getDeviceSettingDescription, getDigitalZoomRatio, getExifTags, getExifVersion, getExposureBiasValue, getExposureIndex, getExposureMode, getExposureProgram, getExposureTime, getFileSource, getFlash, getFlashEnergy, getFlashpixVersion, getFNumber, getFocalLength, getFocalLengthIn35MmFilm, getFocalPlaneResolutionUnit, getFocalPlaneXResolution, getFocalPlaneYResolution, getGainControl, getGamma, getGPSAltitude, getGPSAltitudeRef, getGPSAreaInformation, getGPSDateStamp, getGPSDestBearing, getGPSDestBearingRef, getGPSDestDistance, getGPSDestDistanceRef, getGPSDestLatitude, getGPSDestLatitudeRef, getGPSDestLongitude, getGPSDestLongitudeRef, getGPSDifferential, getGPSDOP, getGPSImgDirection, getGPSImgDirectionRef, getGPSLatitude, getGPSLatitudeRef, getGPSLongitude, getGPSLongitudeRef, getGPSMapDatum, getGPSMeasureMode, getGPSProcessingMethod, getGPSSatellites, getGPSSpeed, getGPSSpeedRef, getGPSStatus, getGPSTags, getGPSTimestamp, getGPSTrack, getGPSTrackRef, getGPSVersionID, getImageUniqueID, getISOSpeed, getISOSpeedLatitudeYYY, getISOSpeedLatitudeZZZ, getLensMake, getLensModel, getLensSerialNumber, getLensSpecification, getLightSource, getMake, getMakerNoteData, getMakerNoteRawData, getMakerNotes, getMaxApertureValue, getMeteringMode, getOECF, getPhotographicSensitivity, getPixelXDimension, getPixelYDimension, getProperties, getRecommendedExposureIndex, getRelatedSoundFile, getSaturation, getSceneCaptureType, getSceneType, getSensingMethod, getSensitivityType, getSharpness, getShutterSpeedValue, getSpatialFrequencyResponse, getSpectralSensitivity, getStandardOutputSensitivity, getSubjectArea, getSubjectDistance, getSubjectDistanceRange, getSubjectLocation, getSubsecTime, getSubsecTimeDigitized, getSubsecTimeOriginal, getUserComment, getWhiteBalance, getWhitePoint, isBigEndian, removeTag, setApertureValue, setBigEndian, setBodySerialNumber, setBrightnessValue, setCameraOwnerName, setCFAPattern, setColorSpace, setCommonTags, setComponentsConfiguration, setCompressedBitsPerPixel, setContrast, setCustomRendered, setDateTimeDigitized, setDateTimeOriginal, setDeviceSettingDescription, setDigitalZoomRatio, setExifTags, setExifVersion, setExposureBiasValue, setExposureIndex, setExposureMode, setExposureProgram, setExposureTime, setFileSource, setFlash, setFlashEnergy, setFlashpixVersion, setFNumber, setFocalLength, setFocalLengthIn35MmFilm, setFocalPlaneResolutionUnit, setFocalPlaneXResolution, setFocalPlaneYResolution, setGainControl, setGamma, setGPSAltitude, setGPSAltitudeRef, setGPSAreaInformation, setGPSDateStamp, setGPSDestBearing, setGPSDestBearingRef, setGPSDestDistance, setGPSDestDistanceRef, setGPSDestLatitude, setGPSDestLatitudeRef, setGPSDestLongitude, setGPSDestLongitudeRef, setGPSDifferential, setGPSDOP, setGPSImgDirection, setGPSImgDirectionRef, setGPSLatitude, setGPSLatitudeRef, setGPSLongitude, setGPSLongitudeRef, setGPSMapDatum, setGPSMeasureMode, setGPSProcessingMethod, setGPSSatellites, setGPSSpeed, setGPSSpeedRef, setGPSStatus, setGPSTags, setGPSTimestamp, setGPSTrack, setGPSTrackRef, setGPSVersionID, setImageUniqueID, setISOSpeed, setISOSpeedLatitudeYYY, setISOSpeedLatitudeZZZ, setLensMake, setLensModel, setLensSerialNumber, setLensSpecification, setLightSource, setMake, setMakerNoteRawData, setMaxApertureValue, setMeteringMode, setOECF, setPhotographicSensitivity, setPixelXDimension, setPixelYDimension, setProperties, setRecommendedExposureIndex, setRelatedSoundFile, setSaturation, setSceneCaptureType, setSceneType, setSensingMethod, setSensitivityType, setSharpness, setShutterSpeedValue, setSpatialFrequencyResponse, setSpectralSensitivity, setStandardOutputSensitivity, setSubjectArea, setSubjectDistance, setSubjectDistanceRange, setSubjectLocation, setSubsecTime, setSubsecTimeDigitized, setSubsecTimeOriginal, setUserComment, setWhiteBalance, setWhitePoint
    • Field Detail

      • MAX_EXIF_SEGMENT_SIZE

        public static final int MAX_EXIF_SEGMENT_SIZE

        The maximum EXIF segment size in bytes allowed.

        See Also:
        Constant Field Values
    • Constructor Detail

      • JpegExifData

        public JpegExifData()

        Initializes a new instance of the JpegExifData class.

      • JpegExifData

        public JpegExifData(com.aspose.cad.fileformats.tiff.TiffDataType[] exifdata)

        Initializes a new instance of the JpegExifData class with data from array.

        Parameters:
        exifdata - Array of EXIF tags together with common and GPS tags.
      • JpegExifData

        public JpegExifData(com.aspose.cad.fileformats.tiff.TiffDataType[] commonTags,
                            com.aspose.cad.fileformats.tiff.TiffDataType[] exifTags,
                            com.aspose.cad.fileformats.tiff.TiffDataType[] gpsTags)

        Initializes a new instance of the JpegExifData class with data from array.

        Parameters:
        commonTags - The common tags.
        exifTags - The EXIF tags.
        gpsTags - The GPS tags.
    • Method Detail

      • getArtist

        public String getArtist()

        Gets or sets the artist.

        Returns:
        The artist.
      • setArtist

        public void setArtist(String value)

        Gets or sets the artist.

        Parameters:
        value - The artist.
      • getBitsPerSample

        public int[] getBitsPerSample()

        Gets or sets the bits per sample.

        Returns:
        The bits per sample.
      • setBitsPerSample

        public void setBitsPerSample(int[] value)

        Gets or sets the bits per sample.

        Parameters:
        value - The bits per sample.
      • getCompression

        public int getCompression()

        Gets or sets the compression.

        Returns:
        The compression.
      • setCompression

        public void setCompression(int value)

        Gets or sets the compression.

        Parameters:
        value - The compression.
      • getCopyright

        public String getCopyright()

        Gets or sets the copyright.

        Returns:
        The copyright.
      • setCopyright

        public void setCopyright(String value)

        Gets or sets the copyright.

        Parameters:
        value - The copyright.
      • getDateTime

        public String getDateTime()

        Gets or sets the date time.

        Returns:
        The date time.
      • setDateTime

        public void setDateTime(String value)

        Gets or sets the date time.

        Parameters:
        value - The date time.
      • getImageDescription

        public String getImageDescription()

        Gets or sets the image description.

        Returns:
        The image description.
      • setImageDescription

        public void setImageDescription(String value)

        Gets or sets the image description.

        Parameters:
        value - The image description.
      • getImageLength

        public long getImageLength()

        Gets or sets the image length.

        Returns:
        The length of the image.
      • setImageLength

        public void setImageLength(long value)

        Gets or sets the image length.

        Parameters:
        value - The length of the image.
      • getImageWidth

        public long getImageWidth()

        Gets or sets the image width.

        Returns:
        The width of the image.
      • setImageWidth

        public void setImageWidth(long value)

        Gets or sets the image width.

        Parameters:
        value - The width of the image.
      • getModel

        public String getModel()

        Gets or sets the model.

        Returns:
        The model.
      • setModel

        public void setModel(String value)

        Gets or sets the model.

        Parameters:
        value - The model.
      • getOrientation

        public int getOrientation()

        Gets or sets the orientation.

        Returns:
        The orientation.
      • setOrientation

        public void setOrientation(int value)

        Gets or sets the orientation.

        Parameters:
        value - The orientation.
      • getPhotometricInterpretation

        public int getPhotometricInterpretation()

        Gets or sets the photometric interpretation.

        Returns:
        The photometric interpretation.
      • setPhotometricInterpretation

        public void setPhotometricInterpretation(int value)

        Gets or sets the photometric interpretation.

        Parameters:
        value - The photometric interpretation.
      • getPlanarConfiguration

        public int getPlanarConfiguration()

        Gets or sets the planar configuration.

        Returns:
        The planar configuration.
      • setPlanarConfiguration

        public void setPlanarConfiguration(int value)

        Gets or sets the planar configuration.

        Parameters:
        value - The planar configuration.
      • getPrimaryChromaticities

        public com.aspose.cad.fileformats.tiff.TiffRational[] getPrimaryChromaticities()

        Gets or sets the chromaticity of the three primary colors of the image.

        Returns:
        The chromaticity of the three primary colors of the image.
      • setPrimaryChromaticities

        public void setPrimaryChromaticities(com.aspose.cad.fileformats.tiff.TiffRational[] value)

        Gets or sets the chromaticity of the three primary colors of the image.

        Parameters:
        value - The chromaticity of the three primary colors of the image.
      • getReferenceBlackWhite

        public com.aspose.cad.fileformats.tiff.TiffRational[] getReferenceBlackWhite()

        Gets or sets the reference black white.

        Returns:
        The reference black white.
      • setReferenceBlackWhite

        public void setReferenceBlackWhite(com.aspose.cad.fileformats.tiff.TiffRational[] value)

        Gets or sets the reference black white.

        Parameters:
        value - The reference black white.
      • getResolutionUnit

        public int getResolutionUnit()

        Gets or sets the resolution unit.

        Returns:
        The resolution unit.
      • setResolutionUnit

        public void setResolutionUnit(int value)

        Gets or sets the resolution unit.

        Parameters:
        value - The resolution unit.
      • getSamplesPerPixel

        public int getSamplesPerPixel()

        Gets or sets the samples per pixel.

        Returns:
        The samples per pixel.
      • setSamplesPerPixel

        public void setSamplesPerPixel(int value)

        Gets or sets the samples per pixel.

        Parameters:
        value - The samples per pixel.
      • getSoftware

        public String getSoftware()

        Gets or sets the software.

        Returns:
        The software.
      • setSoftware

        public void setSoftware(String value)

        Gets or sets the software.

        Parameters:
        value - The software.
      • getThumbnail

        public RasterImage getThumbnail()

        Gets or sets the thumbnail image.

        Returns:
        The thumbnail.
      • setThumbnail

        public void setThumbnail(RasterImage value)

        Gets or sets the thumbnail image.

        Parameters:
        value - The thumbnail.
      • getTransferFunction

        public int[] getTransferFunction()

        Gets or sets the transfer function.

        Returns:
        The transfer function.
      • setTransferFunction

        public void setTransferFunction(int[] value)

        Gets or sets the transfer function.

        Parameters:
        value - The transfer function.
      • getXResolution

        public com.aspose.cad.fileformats.tiff.TiffRational getXResolution()

        Gets or sets the x resolution.

        Returns:
        The x resolution.
      • setXResolution

        public void setXResolution(com.aspose.cad.fileformats.tiff.TiffRational value)

        Gets or sets the x resolution.

        Parameters:
        value - The x resolution.
      • getYCbCrCoefficients

        public com.aspose.cad.fileformats.tiff.TiffRational[] getYCbCrCoefficients()

        Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.

        Returns:
        The matrix coefficients for transformation from RGB to YCbCr image data.
      • setYCbCrCoefficients

        public void setYCbCrCoefficients(com.aspose.cad.fileformats.tiff.TiffRational[] value)

        Gets or sets the matrix coefficients for transformation from RGB to YCbCr image data.

        Parameters:
        value - The matrix coefficients for transformation from RGB to YCbCr image data.
      • getYCbCrPositioning

        public int getYCbCrPositioning()

        Gets or sets the position of chrominance components in relation to the luminance component.

        Returns:
        The position of chrominance components in relation to the luminance component.
      • setYCbCrPositioning

        public void setYCbCrPositioning(int value)

        Gets or sets the position of chrominance components in relation to the luminance component.

        Parameters:
        value - The position of chrominance components in relation to the luminance component.
      • getYCbCrSubSampling

        public int[] getYCbCrSubSampling()

        Gets or sets the sampling ratio of chrominance components in relation to the luminance component.

        Returns:
        The sampling ratio of chrominance components in relation to the luminance component.
      • setYCbCrSubSampling

        public void setYCbCrSubSampling(int[] value)

        Gets or sets the sampling ratio of chrominance components in relation to the luminance component.

        Parameters:
        value - The sampling ratio of chrominance components in relation to the luminance component.
      • getYResolution

        public com.aspose.cad.fileformats.tiff.TiffRational getYResolution()

        Gets or sets the y resolution.

        Returns:
        The y resolution.
      • setYResolution

        public void setYResolution(com.aspose.cad.fileformats.tiff.TiffRational value)

        Gets or sets the y resolution.

        Parameters:
        value - The y resolution.
      • serializeExifData

        public byte[] serializeExifData()

        Serializes the EXIF data. Writes the tags values and contents. The most influencing size tag is Thumbnail tag contents.

        Returns:
        The serialized EXIF data.


        The overall segment size must be less than or equal to MaxExifSegmentSize bytes in order to produce correct jpeg image. Hint: try to reduce the thumbnail size or change its compression in case you have too big EXIF section size.