Enables and disables saving stamp images when saving HEIF/HEIC images.
public bool SaveWithStamp { get; set; }
@property (nonatomic, assign) BOOL saveWithStamp;
public boolean getSaveWithStamp()
public void setSaveWithStamp(boolean value)
SaveWithStamp # get and set (CodecsHeicSaveOptions)
Value | Description |
---|---|
true | To save stamp images |
false | To not save stamp images. The default value is false. |
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.Core;
using Leadtools.Pdf;
public void CodecsHeicOptions_Example()
{
RasterCodecs codecs = new RasterCodecs();
string fileName = "C:\temp\test.heic";
using (RasterImage image = codecs.Load(fileName))
{
/* Save a HEIC file using qFactor of 30 and no stamp */
string outFile30 = @"C:\temp\out30-NoStamp.heic";
codecs.Options.Heic.Load.Multithreaded = false; // CodecsHeicLoadOptions reference
codecs.Options.Heic.Save.QualityFactor = 30; // CodecsHeicOptions & CodecsHeicSaveOptions reference
codecs.Save(image, outFile30, RasterImageFormat.Heic, 0);
/* Save a HEIC file using qFactor of 40 and a stamp */
string outFile40 = @"C:\temp\out40-Stamp.heic";
codecs.Options.Heic.Save.QualityFactor = 40;
codecs.Options.Heic.Save.SaveWithStamp = true;
codecs.Options.Heic.Save.StampWidth = 320;
codecs.Options.Heic.Save.StampHeight = codecs.Options.Heic.Save.StampWidth * image.Height / image.Width;
codecs.Options.Heic.Save.StampBitsPerPixel = 24;
codecs.Save(image, outFile40, RasterImageFormat.Heic, 0);
}
// Clean up
codecs.Dispose();
}
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Paths;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.codecs.*;
import leadtools.imageprocessing.core.MinMaxBitsCommand;
public void codecsHeicOptionsExample(){
final String LEAD_VARS_IMAGES_DIR ="C:\\LEADTOOLS23\\Resources\\Images";
String fileName = combine(LEAD_VARS_IMAGES_DIR,"example.heic");
RasterCodecs codecs = new RasterCodecs();
RasterImage image = codecs.load(fileName);
// Save a HEIC file using qFactor of 30 and no stamp //
String outFile30 = combine(LEAD_VARS_IMAGES_DIR,"out30-NoStamp.heic");
codecs.getOptions().getHeic().getLoad().setMultithreaded(false); //
// CodecsHeicLoadOptions reference
codecs.getOptions().getHeic().getSave().setQualityFactor(30); //
// CodecsHeicOptions & CodecsHeicSaveOptions reference
codecs.save(image, outFile30, RasterImageFormat.HEIC,0);
assertTrue("File unsuccessfully saved to " + outFile30, (new File(outFile30)).exists());
System.out.printf("File successfully saved to %s%n", outFile30);
// Save a HEIC file using qFactor of 40 and a stamp //
String outFile40 = combine(LEAD_VARS_IMAGES_DIR,"out40-Stamp.heic");
codecs.getOptions().getHeic().getSave().setQualityFactor(40);
codecs.getOptions().getHeic().getSave().setSaveWithStamp(true);
codecs.getOptions().getHeic().getSave().setStampWidth(320);
codecs.getOptions().getHeic().getSave().setStampHeight(
(codecs.getOptions().getHeic().getSave().getStampWidth() * image.getHeight())
/ (image.getWidth())
);
codecs.getOptions().getHeic().getSave().setStampBitsPerPixel(24);
codecs.save(image, outFile40, RasterImageFormat.HEIC, 0);
assertTrue("File unsuccessfully saved to " + outFile40, (new File(outFile40)).exists());
System.out.printf("File successfully saved to %s%n", outFile40);
// Clean up
codecs.dispose();
}
High Efficiency File Format - HEIC
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.