Class ResourceDescriptor
Implements
- ResourceMetadata
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
- new ResourceDescriptor(
resource: WebHareBlob | null,
metadata: ResourceMetadataInit,
): ResourceDescriptorParameters
- resource: WebHareBlob | null
- metadata: ResourceMetadataInit
Returns ResourceDescriptor
Properties
[ Marshaller]
"[Marshaller]": {
setValue: (this: ResourceDescriptor, value: HSVMVar) => void;
type: HareScriptType;
} = ...
setValue: (this: ResourceDescriptor, value: HSVMVar) => void;
type: HareScriptType;
} = ...
Accessors
db Loc
- get dbLoc(): WebHareDBLocation | undefined
Returns WebHareDBLocation | undefined
dominant Color
- get dominantColor(): string | null
Returns string | null
- set dominantColor(color: string | null): void
Parameters
- color: string | null
Returns void
extension
- get extension(): string | null
Returns string | null
file
Returns WebHareBlob
file Name
- get fileName(): string | null
Returns string | null
hash
- get hash(): string | null
Returns string | null
height
- get height(): number | null
Returns number | null
media Type
- get mediaType(): string
Returns string
ref Point
- get refPoint(): { x: number; y: number } | null
Returns { x: number; y: number } | null
- set refPoint(refPoint: { x: number; y: number } | null): void
Parameters
- refPoint: { x: number; y: number } | null
Returns void
resource
Returns WebHareBlob
source File
- get sourceFile(): number | null
Original in image library
Returns number | null
width
- get width(): number | null
Returns number | null
Methods
clone
Parameters
Optionaloptions: ResourceScanOptions
Returns Promise<ResourceDescriptor>
export
Parameters
Optionaloptions: ExportOptions
Returns Promise<ExportedResource>
get Metadata
Returns ResourceMetadata
to Link
Parameters
Optionalmethod: LinkMethod
Returns string
to Resized
Parameters
- method: ResizeMethod
Returns ResizedImage
Staticfrom
- from(
str: string | Buffer<ArrayBuffer> | WebHareBlob,
options?: ResourceScanOptions,
): Promise<ResourceDescriptor>Parameters
- str: string | Buffer<ArrayBuffer> | WebHareBlob
Optionaloptions: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Staticfrom Blob
Copies the blob to a new WebHareBlob
Parameters
- str: Blob | File
Optionaloptions: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Staticfrom Disk
Parameters
- path: string
Optionaloptions: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Staticfrom Resource
Parameters
- resource: string
Optionaloptions: ResourceScanOptions
Returns Promise<ResourceDescriptor>
Staticimport
Parameters
- resource: ResourceSource
Optionaloptions: ImportOptions
Returns Promise<ResourceDescriptor>
Database location support cached URL generation