You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The content of this element shall be in the form XX.YYYY, where X and Y represent numerical values; otherwise, the document shall be considered non-conformant. [Aspose.Slides](../../) represents its version in the format XX.YYZZ, where: XX - major version YY - minor version ZZ - patch version For example, the value 23.0105 means [Aspose.Slides](../../) version 23.1.5.
Copy file name to clipboardExpand all lines: content/cpp/english/aspose.slides/ipicturefillformat/_index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ class IPictureFillFormat : public Aspose::Slides::IFillParamSource
19
19
20
20
| Method | Description |
21
21
| --- | --- |
22
+
| virtual **bool** [CompressImage](./compressimage/)(**bool**, **float**) | Compresses the image by reducing its size based on the shape size and specified resolution. Optionally, it also deletes cropped areas. |
22
23
| virtual [System::SharedPtr](../../system/sharedptr/)\<[IPPImage](../ippimage/)\> [DeletePictureCroppedAreas](./deletepicturecroppedareas/)() | Delete cropped areas of the fill [Picture](../picture/). |
| static std::enable_if\<[IsSmartPtr](../../system/issmartptr/)\<T1\>::value\&&[IsSmartPtr](../../system/issmartptr/)\<T2\>::value, **bool**\>::type [Equals](../../system/object/equals/)(T1 const\&, T2 const\&) | Compares reference type objects in C# style. |
@@ -38,7 +39,7 @@ class IPictureFillFormat : public Aspose::Slides::IFillParamSource
38
39
| virtual **float** [get_StretchOffsetRight](./get_stretchoffsetright/)() | Returns right edge of the fill rectangle that is defined by a percentage offset from the right edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read **float**. |
39
40
| virtual **float** [get_StretchOffsetTop](./get_stretchoffsettop/)() | Returns top edge of the fill rectangle that is defined by a percentage offset from the top edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read **float**. |
40
41
| virtual [RectangleAlignment](../rectanglealignment/) [get_TileAlignment](./get_tilealignment/)() | Returns how the texture is aligned within the shape. This setting controls the starting point of the texture pattern and how it repeats across the shape. Read [RectangleAlignment](../rectanglealignment/). |
41
-
| virtual [Aspose::Slides::TileFlip](../tileflip/) [get_TileFlip](./get_tileflip/)() | Flips the texture tile around its horizontal, vertical or both axis. Read [TileFlip](../tileflip/). |
42
+
| virtual [Aspose::Slides::TileFlip](../tileflip/) [get_TileFlip](./get_tileflip/)() | Flips the texture tile around its horizontal, vertical or both axis. Read [Slides::TileFlip](../tileflip/). |
42
43
| virtual **float** [get_TileOffsetX](./get_tileoffsetx/)() | Returns the horizontal offset of the texture from the shape's origin in points. A positive value moves the texture to the right, while a negative value moves it to the left. Read **float**. |
43
44
| virtual **float** [get_TileOffsetY](./get_tileoffsety/)() | Returns the vertical offset of the texture from the shape's origin in points. A positive value moves the texture down, while a negative value moves it up. Read **float**. |
44
45
| virtual **float** [get_TileScaleX](./get_tilescalex/)() | Returns the horizontal scale for the texture fill as a percentage. Read **float**. |
@@ -69,7 +70,7 @@ class IPictureFillFormat : public Aspose::Slides::IFillParamSource
69
70
| virtual void [set_StretchOffsetRight](./set_stretchoffsetright/)(**float**) | Sets right edge of the fill rectangle that is defined by a percentage offset from the right edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Write **float**. |
70
71
| virtual void [set_StretchOffsetTop](./set_stretchoffsettop/)(**float**) | Sets top edge of the fill rectangle that is defined by a percentage offset from the top edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Write **float**. |
71
72
| virtual void [set_TileAlignment](./set_tilealignment/)([RectangleAlignment](../rectanglealignment/)) | Sets how the texture is aligned within the shape. This setting controls the starting point of the texture pattern and how it repeats across the shape. Write [RectangleAlignment](../rectanglealignment/). |
72
-
| virtual void [set_TileFlip](./set_tileflip/)([Aspose::Slides::TileFlip](../tileflip/)) | Flips the texture tile around its horizontal, vertical or both axis. Write [TileFlip](../tileflip/). |
73
+
| virtual void [set_TileFlip](./set_tileflip/)([Aspose::Slides::TileFlip](../tileflip/)) | Flips the texture tile around its horizontal, vertical or both axis. Write [Slides::TileFlip](../tileflip/). |
73
74
| virtual void [set_TileOffsetX](./set_tileoffsetx/)(**float**) | Sets the horizontal offset of the texture from the shape's origin in points. A positive value moves the texture to the right, while a negative value moves it to the left. Write **float**. |
74
75
| virtual void [set_TileOffsetY](./set_tileoffsety/)(**float**) | Sets the vertical offset of the texture from the shape's origin in points. A positive value moves the texture down, while a negative value moves it up. Write **float**. |
75
76
| virtual void [set_TileScaleX](./set_tilescalex/)(**float**) | Sets the horizontal scale for the texture fill as a percentage. Write **float**. |
| deleteCroppedAreasOfImage | **bool** | If true, the method will remove the cropped areas of the image, potentially further reducing its size. |
24
+
| resolution | **float** | The target resolution in DPI. This value must be positive and defines how the image will be resized. |
25
+
26
+
### Return Value
27
+
28
+
A **bool** indicating whether the image was successfully compressed. Returns ****true****
29
+
## Remarks
30
+
31
+
32
+
This method changes the image's size and resolution similar to PowerPoint's \"Picture Format -> Compress Pictures\" feature.
33
+
34
+
35
+
if the image was resized or cropped, otherwise ****false****
36
+
37
+
.
38
+
39
+
40
+
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:
41
+
```cpp
42
+
[C#]
43
+
using (Presentation presentation = new Presentation("demo.pptx"))
44
+
{
45
+
ISlide slide = presentation.Slides[0];
46
+
47
+
// Gets the PictureFrame
48
+
IPictureFrame picFrame = slide.Shapes[0] as IPictureFrame;
49
+
50
+
// Compress the image with a target resolution of 150 DPI (Web resolution) and remove cropped areas
51
+
bool result=picFrame.PictureFormat.CompressImage(true, 150f); // Web resolution
Copy file name to clipboardExpand all lines: content/cpp/english/aspose.slides/islidetext/_index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ class ISlideText : public virtual System::Object
25
25
| static **bool** [Equals](../../system/object/equals/)(**float** const\&, **float** const\&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
26
26
| static **bool** [Equals](../../system/object/equals/)(**double** const\&, **double** const\&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
Copy file name to clipboardExpand all lines: content/cpp/english/aspose.slides/ivideocollection/_index.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,6 @@ class IVideoCollection : public Aspose::Slides::IGenericCollection<System::Share
20
20
| Method | Description |
21
21
| --- | --- |
22
22
| virtual [System::SharedPtr](../../system/sharedptr/)\<[IVideo](../ivideo/)\> [AddVideo](./addvideo/)([System::SharedPtr](../../system/sharedptr/)\<[IVideo](../ivideo/)\>) | Adds a copy of an video file from an another presentation. |
23
-
| virtual [System::SharedPtr](../../system/sharedptr/)\<[IVideo](../ivideo/)\> [AddVideo](./addvideo/)([System::SharedPtr](../../system/sharedptr/)\<[System::IO::Stream](../../system.io/stream/)\>) | Creates and adds a video to a presentation from stream. |
24
23
| virtual [System::SharedPtr](../../system/sharedptr/)\<[IVideo](../ivideo/)\> [AddVideo](./addvideo/)([System::SharedPtr](../../system/sharedptr/)\<[System::IO::Stream](../../system.io/stream/)\>, [LoadingStreamBehavior](../loadingstreambehavior/)) | Creates and adds a video to a presentation from stream. |
25
24
| virtual [System::SharedPtr](../../system/sharedptr/)\<[IVideo](../ivideo/)\> [AddVideo](./addvideo/)([System::ArrayPtr](../../system/arrayptr/)\<**uint8_t**\>) | Creates and adds a video to a presentation from byte array. |
26
25
| [iterator](../../system.collections.generic/ienumerable/iterator/) [begin](../../system.collections.generic/ienumerable/begin/)() | Gets iterator pointing to the first element (if any) of the collection. This iterator can't be used to change a referenced object because [GetEnumerator()](../../system.collections.generic/ienumerable/getenumerator/) returns a copy-object of T. |
0 commit comments