Class FileCreateSource

Class FileCreateSource

이름 공간 : Aspose.Imaging.Sources 모임: Aspose.Imaging.dll (25.4.0)

창조를 위한 파일 출처를 나타냅니다.

[JsonObject(MemberSerialization.OptIn)]
public sealed class FileCreateSource : FileSource

Inheritance

object Source FileSource FileCreateSource

상속 회원들

FileSource.IsTemporal , Source.GetStreamContainer() , object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

FileCreateSource(스트리트)

Aspose.Imaging.Sources.FileCreateSource 클래스의 새로운 예를 시작합니다.

public FileCreateSource(string filePath)

Parameters

filePath string

파일을 만들기 위한 경로.

Examples

이 예제는 BmpOptions 예제의 소스 속성에 의해 지정된 디스크 위치에 새로운 이미지 파일을 생성합니다. 두 번째 매개 변수가 FileCreateSource의 제작자에게 전달되지 않으면 기본적으로 생성되는 파일은 IsTemporal 속성이 True로 설정됩니다. IsTemporal이 True로 설정된 경우 실행 끝에 디스크에 파일이 저장되지 않습니다.

//Creates an instance of BmpOptions and set its various properties
                                                                                                                                                                                                                                                                                                                                                                            Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
                                                                                                                                                                                                                                                                                                                                                                            bmpOptions.BitsPerPixel = 24;

                                                                                                                                                                                                                                                                                                                                                                            //Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
                                                                                                                                                                                                                                                                                                                                                                            //If second parameter is not passed, then by default the file has IsTemporal set to True
                                                                                                                                                                                                                                                                                                                                                                            bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"C:\temp\output.bmp");

                                                                                                                                                                                                                                                                                                                                                                            //Creates an instance of Image 
                                                                                                                                                                                                                                                                                                                                                                            using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
                                                                                                                                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                                                                                                                                                //do some image processing
                                                                                                                                                                                                                                                                                                                                                                            }

FileCreateSource(링크, 볼)

Aspose.Imaging.Sources.FileCreateSource 클래스의 새로운 예를 시작합니다.

[JsonConstructor]
public FileCreateSource(string filePath, bool isTemporal)

Parameters

filePath string

파일을 만들기 위한 경로.

isTemporal bool

‘진실’으로 설정하면 만들어진 파일이 일시적입니다.

Examples

이 예제는 BmpOptions 예제의 소스 속성에 의해 지정된 디스크 위치에 새로운 이미지 파일을 생성합니다. BmpOptions 예제에 대한 여러 속성은 실제 이미지를 생성하기 전에 설정됩니다.

//Create an instance of BmpOptions and set its various properties
                                                                                                                                                                                                                                                                                                             Aspose.Imaging.ImageOptions.BmpOptions bmpOptions = new Aspose.Imaging.ImageOptions.BmpOptions();
                                                                                                                                                                                                                                                                                                             bmpOptions.BitsPerPixel = 24;

                                                                                                                                                                                                                                                                                                             //Create an instance of FileCreateSource and assign it as Source for the instance of BmpOptions
                                                                                                                                                                                                                                                                                                             //Second Boolean parameter determines if the file to be created IsTemporal or not
                                                                                                                                                                                                                                                                                                             bmpOptions.Source = new Aspose.Imaging.Sources.FileCreateSource(@"C:\temp\output.bmp", false);

                                                                                                                                                                                                                                                                                                             //Create an instance of Image and initialize it with instance of BmpOptions by calling Create method
                                                                                                                                                                                                                                                                                                             using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Create(bmpOptions, 500, 500))
                                                                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                                                                 //do some image processing

                                                                                                                                                                                                                                                                                                                 // save all changes
                                                                                                                                                                                                                                                                                                                 image.Save();
                                                                                                                                                                                                                                                                                                             }

Properties

FilePath

만들기 위해 파일 경로를 얻습니다.

[JsonProperty]
public string FilePath { get; }

부동산 가치

string

IsTemporal

파일이 일시적인지 여부를 나타내는 값을 얻습니다.

[JsonProperty]
public override bool IsTemporal { get; }

부동산 가치

bool

Methods

GetStreamContainer()

흐름 컨테이너를 가져옵니다.

public override StreamContainer GetStreamContainer()

Returns

StreamContainer

흐름 컨테이너

Remarks

조심스럽게 사용하십시오.당신은 회수 후에 흐름 컨테이너를 분해해야합니다.

 한국어