diff --git a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/_index.md b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/_index.md index b40f9d16de..2e9cab4ef5 100644 --- a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/_index.md +++ b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/_index.md @@ -34,6 +34,56 @@ public abstract class BaseLayerSectionResource : LayerResource | override [Save](../../aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/save/)(StreamContainer, int) | Saves the resource to the specified stream container. | | override [ToString](../../aspose.psd.fileformats.psd.layers/layerresource/tostring/)() | Returns a String that represents this instance. | +## Examples + +The following code demonstrates classes hierarchy of layer section resources. + +```csharp +[C#] + +void AssertAreEqual(object expected, object actual, string message = null) +{ + if (!object.Equals(expected, actual)) + { + throw new FormatException(message ?? "Objects are not equal."); + } +} + +string srcFile = "123 1.psd"; +string outFile = "output.psd"; + +using (var psdImage = (PsdImage)Image.Load(srcFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); + + psdImage.Save(outFile); +} + +// check after saving +using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); +} + +File.Delete(outFile); +``` + ### See Also * class [LayerResource](../../aspose.psd.fileformats.psd.layers/layerresource/) diff --git a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/blendmodekey/_index.md b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/blendmodekey/_index.md index a50ef9d935..b4a6c50396 100644 --- a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/blendmodekey/_index.md +++ b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/blendmodekey/_index.md @@ -52,6 +52,54 @@ using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadE } ``` +The following code demonstrates classes hierarchy of layer section resources. + +```csharp +[C#] + +void AssertAreEqual(object expected, object actual, string message = null) +{ + if (!object.Equals(expected, actual)) + { + throw new FormatException(message ?? "Objects are not equal."); + } +} + +string srcFile = "123 1.psd"; +string outFile = "output.psd"; + +using (var psdImage = (PsdImage)Image.Load(srcFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); + + psdImage.Save(outFile); +} + +// check after saving +using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); +} + +File.Delete(outFile); +``` + ### See Also * enum [BlendMode](../../../aspose.psd.fileformats.core.blending/blendmode/) diff --git a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/sectiontype/_index.md b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/sectiontype/_index.md index 95245ef858..0845344f43 100644 --- a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/sectiontype/_index.md +++ b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/sectiontype/_index.md @@ -46,6 +46,54 @@ using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadE } ``` +The following code demonstrates classes hierarchy of layer section resources. + +```csharp +[C#] + +void AssertAreEqual(object expected, object actual, string message = null) +{ + if (!object.Equals(expected, actual)) + { + throw new FormatException(message ?? "Objects are not equal."); + } +} + +string srcFile = "123 1.psd"; +string outFile = "output.psd"; + +using (var psdImage = (PsdImage)Image.Load(srcFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); + + psdImage.Save(outFile); +} + +// check after saving +using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); +} + +File.Delete(outFile); +``` + ### See Also * enum [LayerSectionType](../../layersectiontype/) diff --git a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/subtype/_index.md b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/subtype/_index.md index 6a598b1847..ec37d94eee 100644 --- a/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/subtype/_index.md +++ b/english/net/aspose.psd.fileformats.psd.layers.layerresources/baselayersectionresource/subtype/_index.md @@ -46,6 +46,54 @@ using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadE } ``` +The following code demonstrates classes hierarchy of layer section resources. + +```csharp +[C#] + +void AssertAreEqual(object expected, object actual, string message = null) +{ + if (!object.Equals(expected, actual)) + { + throw new FormatException(message ?? "Objects are not equal."); + } +} + +string srcFile = "123 1.psd"; +string outFile = "output.psd"; + +using (var psdImage = (PsdImage)Image.Load(srcFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); + + psdImage.Save(outFile); +} + +// check after saving +using (var psdImage = (PsdImage)Image.Load(outFile, new PsdLoadOptions() { LoadEffectsResource = true })) +{ + AssertAreEqual((psdImage.Layers[3].Resources[3] as LayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as LsdkResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[3].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).SectionType, LayerSectionType.SectionDivider); + + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Length, 4); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).BlendModeKey, BlendMode.Absent); + AssertAreEqual((psdImage.Layers[8].Resources[3] as BaseLayerSectionResource).Subtype, LayerSectionSubtype.NotUsed); +} + +File.Delete(outFile); +``` + ### See Also * enum [LayerSectionSubtype](../../layersectionsubtype/) diff --git a/english/net/aspose.psd.imageoptions/psdoptions/_index.md b/english/net/aspose.psd.imageoptions/psdoptions/_index.md index c834f7b9ac..663e3b98f5 100644 --- a/english/net/aspose.psd.imageoptions/psdoptions/_index.md +++ b/english/net/aspose.psd.imageoptions/psdoptions/_index.md @@ -43,7 +43,7 @@ public class PsdOptions : ImageOptionsBase | [RefreshImagePreviewData](../../aspose.psd.imageoptions/psdoptions/refreshimagepreviewdata/) { get; set; } | Gets or sets a value indicating whether [refresh image preview data] - option used to maximize compatibility with another PSD image viewers. Please note, text layers drawing to final layout is not supported for Compact Framework platform | | [RemoveGlobalTextEngineResource](../../aspose.psd.imageoptions/psdoptions/removeglobaltextengineresource/) { get; set; } | Gets or sets a value indicating whether - Remove the global text engine resource - Used for some text-layered psd files, in only case, when they can not be opened in Adobe Photoshop after processing (mostly for absent fonts text layers related). After using this option, user need to Make next in opened in Photoshop file: Menu "Text" -> "Process absent fonts". After that operation all text will appear again. Please note, that this operation may cause some final layout changes. | | virtual [ResolutionSettings](../../aspose.psd/imageoptionsbase/resolutionsettings/) { get; set; } | Gets or sets the resolution settings. | -| [Resources](../../aspose.psd.imageoptions/psdoptions/resources/) { get; set; } | Gets or sets the psd resources. | +| [Resources](../../aspose.psd.imageoptions/psdoptions/resources/) { get; set; } | Gets or sets the psd resources. If value: NULL - than save the original ImageResources (default behavior) Not Empty - than save the resources passed into this property + [required resources] Empty - than only [required resources] be saved. Required resources: ResolutionInfoResource, XmpResource | | [Source](../../aspose.psd/imageoptionsbase/source/) { get; set; } | Gets or sets the source to create image in. | | [UpdateMetadata](../../aspose.psd.imageoptions/psdoptions/updatemetadata/) { get; set; } | Gets or sets a value indicating whether [update metadata]. If the value is true, the metadata will be updated while saving an image. | | [VectorRasterizationOptions](../../aspose.psd/imageoptionsbase/vectorrasterizationoptions/) { get; set; } | Gets or sets the vector rasterization options. | diff --git a/english/net/aspose.psd.imageoptions/psdoptions/resources/_index.md b/english/net/aspose.psd.imageoptions/psdoptions/resources/_index.md index 139347a3ab..06bbc2cb79 100644 --- a/english/net/aspose.psd.imageoptions/psdoptions/resources/_index.md +++ b/english/net/aspose.psd.imageoptions/psdoptions/resources/_index.md @@ -1,7 +1,7 @@ --- title: PsdOptions.Resources second_title: Aspose.PSD for .NET API Reference -description: PsdOptions property. Gets or sets the psd resources +description: PsdOptions property. Gets or sets the psd resources. If value NULL than save the original ImageResources default behavior Not Empty than save the resources passed into this property required resources Empty than only required resources be saved. Required resources ResolutionInfoResource XmpResource type: docs weight: 100 url: /net/aspose.psd.imageoptions/psdoptions/resources/ @@ -9,7 +9,7 @@ url: /net/aspose.psd.imageoptions/psdoptions/resources/ {{< psd/tize >}} ## PsdOptions.Resources property -Gets or sets the psd resources. +Gets or sets the psd resources. If value: NULL - than save the original ImageResources (default behavior) Not Empty - than save the resources passed into this property + [required resources] Empty - than only [required resources] be saved. Required resources: ResolutionInfoResource, XmpResource ```csharp public ResourceBlock[] Resources { get; set; } diff --git a/english/net/aspose.psd/image/resize/_index.md b/english/net/aspose.psd/image/resize/_index.md index 3a8159f1fc..254c966122 100644 --- a/english/net/aspose.psd/image/resize/_index.md +++ b/english/net/aspose.psd/image/resize/_index.md @@ -1,35 +1,12 @@ --- title: Image.Resize second_title: Aspose.PSD for .NET API Reference -description: Image method. Resizes the image +description: Image method. Resizes the image. The default NearestNeighbourResample is used type: docs weight: 200 url: /net/aspose.psd/image/resize/ --- {{< psd/tize >}} -## Resize(int, int, ResizeType) {#resize_2} - -Resizes the image. - -```csharp -public abstract void Resize(int newWidth, int newHeight, ResizeType resizeType) -``` - -| Parameter | Type | Description | -| --- | --- | --- | -| newWidth | Int32 | The new width. | -| newHeight | Int32 | The new height. | -| resizeType | ResizeType | The resize type. | - -### See Also - -* enum [ResizeType](../../resizetype/) -* class [Image](../) -* namespace [Aspose.PSD](../../../aspose.psd/) -* assembly [Aspose.PSD](../../../) - ---- - ## Resize(int, int) {#resize} Resizes the image. The default NearestNeighbourResample is used. @@ -70,6 +47,29 @@ using (RasterImage image = Image.Load(sourceFileName, new PsdLoadOptions() { Loa --- +## Resize(int, int, ResizeType) {#resize_2} + +Resizes the image. + +```csharp +public abstract void Resize(int newWidth, int newHeight, ResizeType resizeType) +``` + +| Parameter | Type | Description | +| --- | --- | --- | +| newWidth | Int32 | The new width. | +| newHeight | Int32 | The new height. | +| resizeType | ResizeType | The resize type. | + +### See Also + +* enum [ResizeType](../../resizetype/) +* class [Image](../) +* namespace [Aspose.PSD](../../../aspose.psd/) +* assembly [Aspose.PSD](../../../) + +--- + ## Resize(int, int, ImageResizeSettings) {#resize_1} Resizes the image. diff --git a/english/net/aspose.psd/imageoptionsbase/palette/_index.md b/english/net/aspose.psd/imageoptionsbase/palette/_index.md index 76dfe37849..8ddc263128 100644 --- a/english/net/aspose.psd/imageoptionsbase/palette/_index.md +++ b/english/net/aspose.psd/imageoptionsbase/palette/_index.md @@ -15,10 +15,6 @@ Gets or sets the color palette. public virtual IColorPalette Palette { get; set; } ``` -### Property Value - -The color palette. - ### See Also * interface [IColorPalette](../../icolorpalette/) diff --git a/english/net/aspose.psd/imageoptionsbase/vectorrasterizationoptions/_index.md b/english/net/aspose.psd/imageoptionsbase/vectorrasterizationoptions/_index.md index 634d288c10..5b1e5653c8 100644 --- a/english/net/aspose.psd/imageoptionsbase/vectorrasterizationoptions/_index.md +++ b/english/net/aspose.psd/imageoptionsbase/vectorrasterizationoptions/_index.md @@ -15,10 +15,6 @@ Gets or sets the vector rasterization options. public VectorRasterizationOptions VectorRasterizationOptions { get; set; } ``` -### Property Value - -The vector rasterization options. - ### See Also * class [VectorRasterizationOptions](../../../aspose.psd.imageoptions/vectorrasterizationoptions/) diff --git a/english/net/aspose.psd/rastercachedimage/adjustgamma/_index.md b/english/net/aspose.psd/rastercachedimage/adjustgamma/_index.md index 250ee017e5..01a162fcec 100644 --- a/english/net/aspose.psd/rastercachedimage/adjustgamma/_index.md +++ b/english/net/aspose.psd/rastercachedimage/adjustgamma/_index.md @@ -7,17 +7,19 @@ weight: 40 url: /net/aspose.psd/rastercachedimage/adjustgamma/ --- {{< psd/tize >}} -## AdjustGamma(float) {#adjustgamma} +## AdjustGamma(float, float, float) {#adjustgamma_1} Gamma-correction of an image. ```csharp -public override void AdjustGamma(float gamma) +public override void AdjustGamma(float gammaRed, float gammaGreen, float gammaBlue) ``` | Parameter | Type | Description | | --- | --- | --- | -| gamma | Single | Gamma for red, green and blue channels coefficient | +| gammaRed | Single | Gamma for red channel coefficient | +| gammaGreen | Single | Gamma for green channel coefficient | +| gammaBlue | Single | Gamma for blue channel coefficient | ### See Also @@ -27,19 +29,17 @@ public override void AdjustGamma(float gamma) --- -## AdjustGamma(float, float, float) {#adjustgamma_1} +## AdjustGamma(float) {#adjustgamma} Gamma-correction of an image. ```csharp -public override void AdjustGamma(float gammaRed, float gammaGreen, float gammaBlue) +public override void AdjustGamma(float gamma) ``` | Parameter | Type | Description | | --- | --- | --- | -| gammaRed | Single | Gamma for red channel coefficient | -| gammaGreen | Single | Gamma for green channel coefficient | -| gammaBlue | Single | Gamma for blue channel coefficient | +| gamma | Single | Gamma for red, green and blue channels coefficient | ### See Also diff --git a/english/net/aspose.psd/rasterimage/adjustgamma/_index.md b/english/net/aspose.psd/rasterimage/adjustgamma/_index.md index a92698e587..615e5f4f8c 100644 --- a/english/net/aspose.psd/rasterimage/adjustgamma/_index.md +++ b/english/net/aspose.psd/rasterimage/adjustgamma/_index.md @@ -7,17 +7,19 @@ weight: 200 url: /net/aspose.psd/rasterimage/adjustgamma/ --- {{< psd/tize >}} -## AdjustGamma(float) {#adjustgamma} +## AdjustGamma(float, float, float) {#adjustgamma_1} Gamma-correction of an image. ```csharp -public virtual void AdjustGamma(float gamma) +public virtual void AdjustGamma(float gammaRed, float gammaGreen, float gammaBlue) ``` | Parameter | Type | Description | | --- | --- | --- | -| gamma | Single | Gamma for red, green and blue channels coefficient | +| gammaRed | Single | Gamma for red channel coefficient | +| gammaGreen | Single | Gamma for green channel coefficient | +| gammaBlue | Single | Gamma for blue channel coefficient | ### See Also @@ -27,19 +29,17 @@ public virtual void AdjustGamma(float gamma) --- -## AdjustGamma(float, float, float) {#adjustgamma_1} +## AdjustGamma(float) {#adjustgamma} Gamma-correction of an image. ```csharp -public virtual void AdjustGamma(float gammaRed, float gammaGreen, float gammaBlue) +public virtual void AdjustGamma(float gamma) ``` | Parameter | Type | Description | | --- | --- | --- | -| gammaRed | Single | Gamma for red channel coefficient | -| gammaGreen | Single | Gamma for green channel coefficient | -| gammaBlue | Single | Gamma for blue channel coefficient | +| gamma | Single | Gamma for red, green and blue channels coefficient | ### See Also