update common/src/main/ets/default/model/browser/photo/Thumbnail.ts.

Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
liujuan 2024-02-18 07:40:01 +00:00 committed by Gitee
parent 18f7fcd253
commit 1e5edb5fd4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -14,11 +14,16 @@
*/
import type { Releasable } from '../../common/Releasable';
import image from '@ohos.multimedia.image';
/**
* Thumbnail, view layer, data encapsulation
*/
export class Thumbnail implements Releasable {
/**
* url
*/
readonly url: string = '';
/**
* pixelMap
@ -35,8 +40,9 @@ export class Thumbnail implements Releasable {
*/
height?: number = 0;
constructor(pixelMap: any, width: number, height: number) {
this.pixelMap = pixelMap;
constructor(url?: string, pixelMap?: image.PixelMap, width?: number, height?: number) {
this.url = url ? url : '';
this.pixelMap = pixelMap ? pixelMap : undefined;
this.width = width;
this.height = height;
}