Browse our Products
Aspose.Slides for Android via Java 24.9 Release Notes
Key | Summary | Category |
---|---|---|
SLIDESANDROID-463 | Use Aspose.Slides for Java 24.9 features | Enhancement |
Public API Changes
New Enum Members: EffectType.FloatUp and EffectType.FloatDown Have Been Added
New members have been added to the EffectType
enum: FloatUp
, which is an alias for the existing type Ascend
, and FloatDown
, which is an alias for the existing type Descend
.
The following example demonstrates how these aliases will work:
int type = EffectType.Descend;
System.out.println(type == EffectType.Descend); // Should return 'true'
System.out.println(type == EffectType.FloatDown); // Should return 'true'
type = EffectType.FloatDown;
System.out.println(type == EffectType.Descend); // Should return 'true'
System.out.println(type == EffectType.FloatDown); // Should return 'true'
type = EffectType.Ascend;
System.out.println(type == EffectType.Ascend); // Should return 'true'
System.out.println(type == EffectType.FloatUp); // Should return 'true'
type = EffectType.FloatUp;
System.out.println(type == EffectType.Ascend); // Should return 'true'
System.out.println(type == EffectType.FloatUp); // Should return 'true'
IPictureFillFormat.CompressImage Method Has Been Added
This method compresses an image by reducing its size based on the shape size and specified resolution, with the option to delete cropped areas. It adjusts the picture’s size and resolution similarly to PowerPoint’s Picture Format -> Compress Pictures -> Resolution feature.
The following example demonstrates how to use the CompressImage
method to reduce the size of an image in a presentation by setting a target resolution and removing cropped areas:
Presentation presentation = new Presentation("demo.pptx");
try {
ISlide slide = presentation.getSlides().get_Item(0);
// Get the PictureFrame from the slide
IPictureFrame picFrame = (IPictureFrame)slide.getShapes().get_Item(0);
// Compress the image with a target resolution of 150 DPI (Web resolution) and remove cropped areas
boolean result = picFrame.getPictureFormat().compressImage(true, 150f);
// Check the result of the compression
if (result)
{
System.out.println("Image successfully compressed.");
}
else
{
System.out.println("Image compression failed or no changes were necessary.");
}
} finally {
if (presentation != null) presentation.dispose();
}
ISlideText.CommentsText Property Has Been Added
A new CommentText
property has been added to the ISlideText
interface. This property allows you to retrieve the comment text using the PresentationFactory.Instance.GetPresentationText
method.
The following example demonstrates how to retrieve comment text from a presentation:
IPresentationText presentationText = PresentationFactory.getInstance().getPresentationText("Presentation.pptx", TextExtractionArrangingMode.Unarranged);
for (int i = 0 ; i < presentationText.getSlidesText().length ; i++)
{
System.out.println("Comments for slide " + (i+1) + " : " + presentationText.getSlidesText()[i].getCommentsText() + "\n");
}
Note: You can retrieve comment text only in the
TextExtractionArrangingMode.Unarranged
mode.
Obsolete IVideoCollection.AddVideo Method Has Been Removed
The method addVideo(InputStream stream)
has been removed from the VideoCollection
class and the IVideoCollection
interface.
Please use the addVideo(InputStream stream, int loadingStreamBehavior)
method instead.