mirror of
https://gitee.com/openharmony/applications_photos
synced 2024-11-27 09:12:32 +00:00
update common/src/main/ets/default/model/browser/photo/Thumbnail.ts.
Signed-off-by: liujuan <liujuan76@h-partners.com>
This commit is contained in:
parent
18f7fcd253
commit
1e5edb5fd4
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user