UNPKG

kh-tool

Version:
28 lines (27 loc) 938 B
/** * Mega pixel image rendering library for iOS6 Safari * * Fixes iOS6 Safari's image file rendering issue for large size image (over mega-pixel), * which causes unexpected subsampling when drawing it in canvas. * By using this library, you can safely render the image with proper stretching. * * Copyright (c) 2012 Shinichi Tomita <shinichi.tomita@gmail.com> * Released under the MIT license */ /** * Detect subsampling in loaded image. * In iOS, larger images than 2M pixels may be subsampled in rendering. */ /** * MegaPixImage class */ export declare class MegaPixImage { blob: Blob | null | undefined; imageLoadListeners: any[] | null | undefined; srcImage: HTMLImageElement; constructor(param: HTMLImageElement | Blob); /** * Rendering megapix image into specified target element */ render(target: HTMLElement, options: any, callback?: () => any): void; }