Packages

 

com.aspose.imaging

Interfaces

Classes

Exceptions

com.aspose.imaging

Class LoadOptions

    • Constructor Detail

      • LoadOptions

        public LoadOptions()
    • Method Detail

      • getDataRecoveryMode

        public int getDataRecoveryMode()

        Gets the data recovery mode.

        Returns:
        The data recovery mode.
      • setDataRecoveryMode

        public void setDataRecoveryMode(int value)

        Sets the data recovery mode.

        Parameters:
        value - The data recovery mode.
      • getDataBackgroundColor

        public Color getDataBackgroundColor()

        Gets the Image background Color.

        Returns:
        The background color.

        Typically the background color is set whenever pixel value cannot be recovered due to data corruption.

      • setDataBackgroundColor

        public void setDataBackgroundColor(Color value)

        Sets the Image background Color.

        Parameters:
        value - The background color.

        Typically the background color is set whenever pixel value cannot be recovered due to data corruption.

      • getUseIccProfileConversion

        public boolean getUseIccProfileConversion()

        Gets a value indicating whether ICC profile conversion should be applied.

      • setUseIccProfileConversion

        public void setUseIccProfileConversion(boolean value)

        Sets a value indicating whether ICC profile conversion should be applied.

      • getBufferSizeHint

        public final int getBufferSizeHint()

        Gets the buffer size hint which is defined max allowed size for all internal buffers.

        Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal buffers
        Returns:
        the buffer size hint which is defined max allowed size for all internal buffers.
      • setBufferSizeHint

        public final void setBufferSizeHint(int value)

        Sets the buffer size hint which is defined max allowed size for all internal buffers.

        Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal buffers
        Parameters:
        value - the buffer size hint which is defined max allowed size for all internal buffers.
        Code example:

        The following example shows how to set a memory limit when loading a CMX image. The memory limit is the maximum allowed size (in megabytes) for all internal buffers.


        String workDir = "c:\\temp\\";
        
        // Setting a memory limit of 10 megabytes for target loaded image
        com.aspose.imaging.LoadOptions loadOptions = new com.aspose.imaging.LoadOptions();
        loadOptions.setBufferSizeHint(10);
        com.aspose.imaging.Image image = com.aspose.imaging.Image.load(workDir + "example.cmx", loadOptions);
        try {
            com.aspose.imaging.imageoptions.PngOptions options = new com.aspose.imaging.imageoptions.PngOptions();
            com.aspose.imaging.imageoptions.CmxRasterizationOptions rasterizationOptions = new com.aspose.imaging.imageoptions.CmxRasterizationOptions();
            rasterizationOptions.setTextRenderingHint(com.aspose.imaging.TextRenderingHint.SingleBitPerPixel);
            rasterizationOptions.setSmoothingMode(com.aspose.imaging.SmoothingMode.AntiAlias);
            rasterizationOptions.setPositioning(com.aspose.imaging.imageoptions.PositioningTypes.DefinedByDocument);
            options.setVectorRasterizationOptions(rasterizationOptions);
            image.save(workDir + "output.png", options);
        } finally {
            image.close();
        }
        

      • getProgressEventHandler

        public final ProgressEventHandler getProgressEventHandler()

        Gets the progress event handler.

        Value: The progress event handler.
        Specified by:
        getProgressEventHandler in interface com.aspose.imaging_internal.progressmanagement.IProgressEventHandler
        Returns:
        the progress event handler.
      • setProgressEventHandler

        public final void setProgressEventHandler(ProgressEventHandler value)

        Sets the progress event handler.

        Value: The progress event handler.
        Parameters:
        value - the progress event handler.