1.imageknife在library中初始化,并且导出给entry使用
Signed-off-by: zhoulisheng <635547767@qq.com>
This commit is contained in:
parent
1027156627
commit
8f01a3a3b4
|
@ -6,7 +6,7 @@
|
|||
"repository": {},
|
||||
"version": "2.1.1-rc.0",
|
||||
"dependencies": {
|
||||
"@ohos/imageknife": "file:../imageknife",
|
||||
"@ohos/libraryimageknife": "file:../library",
|
||||
"@ohos/disklrucache": "^2.0.2-rc.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { EngineKeyFactories, EngineKeyInterface, RequestOption } from '@ohos/imageknife'
|
||||
import { ObjectKey } from '@ohos/imageknife/src/main/ets/components/imageknife/ObjectKey';
|
||||
import { EngineKeyFactories, EngineKeyInterface, RequestOption } from '@ohos/libraryimageknife'
|
||||
import { ObjectKey } from '@ohos/libraryimageknife';
|
||||
|
||||
export class CustomEngineKeyImpl implements EngineKeyInterface {
|
||||
redefineUrl: (loadSrc: string) => string;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
import UIAbility from '@ohos.app.ability.UIAbility';
|
||||
import hilog from '@ohos.hilog';
|
||||
import window from '@ohos.window';
|
||||
import { ImageKnifeGlobal,ImageKnife,ImageKnifeDrawFactory,LogUtil } from '@ohos/imageknife'
|
||||
import {InitImageKnife, ImageKnifeGlobal,ImageKnife,ImageKnifeDrawFactory,LogUtil } from '@ohos/libraryimageknife'
|
||||
import { CustomEngineKeyImpl } from './CustomEngineKeyImpl'
|
||||
import abilityAccessCtrl,{Permissions} from '@ohos.abilityAccessCtrl';
|
||||
import { BusinessError } from '@ohos.base'
|
||||
|
@ -38,7 +38,7 @@ export default class EntryAbility extends UIAbility {
|
|||
windowStage.loadContent('pages/index', (err:BusinessError, data:void) => {
|
||||
});
|
||||
|
||||
ImageKnife.with(this.context);
|
||||
InitImageKnife.init(this.context);
|
||||
|
||||
let imageKnife:ImageKnife|undefined = ImageKnifeGlobal.getInstance().getImageKnife()
|
||||
if(imageKnife != undefined) {
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
ImageKnifeOption,
|
||||
RotateImageTransformation,
|
||||
RoundedCornersTransformation
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ImageKnifeComponent, ImageKnifeOption,NONE,DiskStrategy } from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent, ImageKnifeOption,NONE,DiskStrategy } from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ImageKnifeComponent, ImageKnifeOption, NONE, DiskStrategy } from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent, ImageKnifeOption, NONE, DiskStrategy } from '@ohos/libraryimageknife'
|
||||
import { ObjectKey } from '@ohos/imageknife/src/main/ets/components/imageknife/ObjectKey';
|
||||
|
||||
@Entry
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeOption,ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption,ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FileUtils, ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import { FileUtils, ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import { BusinessError } from '@ohos.base'
|
||||
import common from '@ohos.app.ability.common';
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import featureAbility from '@ohos.ability.featureAbility';
|
||||
import { FileUtils } from '@ohos/imageknife'
|
||||
import { FileTypeUtil } from '@ohos/imageknife'
|
||||
import { FileUtils } from '@ohos/libraryimageknife'
|
||||
import { FileTypeUtil } from '@ohos/libraryimageknife'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import { Base64 } from '@ohos/imageknife'
|
||||
import { ParseImageUtil } from '@ohos/imageknife'
|
||||
import { ImageKnifeGlobal } from '@ohos/imageknife'
|
||||
import { Base64 } from '@ohos/libraryimageknife'
|
||||
import { ParseImageUtil } from '@ohos/libraryimageknife'
|
||||
import { ImageKnifeGlobal } from '@ohos/libraryimageknife'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
import common from '@ohos.app.ability.common';
|
||||
@Entry
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import featureAbility from '@ohos.ability.featureAbility';
|
||||
import {FileUtils} from '@ohos/imageknife'
|
||||
import {FileTypeUtil} from '@ohos/imageknife'
|
||||
import {FileUtils} from '@ohos/libraryimageknife'
|
||||
import {FileTypeUtil} from '@ohos/libraryimageknife'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import {Base64} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {Base64} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
import common from '@ohos.app.ability.common';
|
||||
@Entry
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
import {OnRenameListener} from '@ohos/imageknife'
|
||||
import {OnCompressListener} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife} from '@ohos/libraryimageknife'
|
||||
import {OnRenameListener} from '@ohos/libraryimageknife'
|
||||
import {OnCompressListener} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -13,14 +13,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CropImage } from '@ohos/imageknife'
|
||||
import { CropOptions } from '@ohos/imageknife'
|
||||
import { Crop } from '@ohos/imageknife'
|
||||
import { RecourseProvider } from '@ohos/imageknife'
|
||||
import { PixelMapCrop,Options } from '@ohos/imageknife'
|
||||
import { CropCallback } from '@ohos/imageknife'
|
||||
import { FileUtils } from '@ohos/imageknife'
|
||||
import { ImageKnifeGlobal } from '@ohos/imageknife'
|
||||
import { CropImage } from '@ohos/libraryimageknife'
|
||||
import { CropOptions } from '@ohos/libraryimageknife'
|
||||
import { Crop } from '@ohos/libraryimageknife'
|
||||
import { RecourseProvider } from '@ohos/libraryimageknife'
|
||||
import { PixelMapCrop,Options } from '@ohos/libraryimageknife'
|
||||
import { CropCallback } from '@ohos/libraryimageknife'
|
||||
import { FileUtils } from '@ohos/libraryimageknife'
|
||||
import { ImageKnifeGlobal } from '@ohos/libraryimageknife'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import common from '@ohos.app.ability.common'
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
|
||||
import { ImageKnifeComponent, ImageKnifeOption, } from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent, ImageKnifeOption, } from '@ohos/libraryimageknife'
|
||||
|
||||
|
||||
@Entry
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
ImageKnifeOption,
|
||||
ImageKnifeDrawFactory,
|
||||
ScaleType
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {RoundedCornersTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {RoundedCornersTransformation} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {GIFParseImpl} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
import {GIFParseImpl} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {ImageKnife} from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker';
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import { BusinessError } from '@ohos.base'
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ImageKnifeComponent, ImageKnifeOption, FileUtils } from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent, ImageKnifeOption, FileUtils } from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
ImageKnifeOption,
|
||||
ImageKnifeGlobal,
|
||||
ImageKnife
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker';
|
||||
import { ObjectKey } from '@ohos/imageknife/src/main/ets/components/imageknife/ObjectKey';
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent, ScaleType} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent, ScaleType} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {Material} from './model/Material'
|
||||
import {TestDataSource} from './model/TestDataSource'
|
||||
import {DiskLruCache} from '@ohos/disklrucache'
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
import router from '@system.router';
|
||||
import { Pngj } from '@ohos/imageknife'
|
||||
import { Pngj } from '@ohos/libraryimageknife'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import { FileUtils,ImageKnifeGlobal } from '@ohos/imageknife'
|
||||
import { FileUtils,ImageKnifeGlobal } from '@ohos/libraryimageknife'
|
||||
import featureability from '@ohos.ability.featureAbility'
|
||||
import ArkWorker from '@ohos.worker'
|
||||
import worker from '@ohos.worker';
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {RoundedCornersTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {RoundedCornersTransformation} from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {LruCache} from '@ohos/imageknife'
|
||||
import {LruCache} from '@ohos/libraryimageknife'
|
||||
|
||||
function getRandomInt(min:number, max:number):number {
|
||||
min = Math.ceil(min);
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {SVGParseImpl} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {SVGParseImpl} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import resourceManager from '@ohos.resourceManager';
|
||||
import {BusinessError} from '@ohos.base'
|
||||
import common from '@ohos.app.ability.common';
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
ImageKnife,
|
||||
ImageKnifeDrawFactory,
|
||||
ScaleType
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker';
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {RequestOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeData} from '@ohos/imageknife'
|
||||
import {AllCacheInfo,IAllCacheInfoCallback} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {TransformType} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {RequestOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeData} from '@ohos/libraryimageknife'
|
||||
import {AllCacheInfo,IAllCacheInfoCallback} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {TransformType} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {BusinessError} from '@ohos.base'
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {ImageKnife} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker'
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnife,ImageKnifeGlobal, ImageKnifeComponent, ImageKnifeOption } from '@ohos/imageknife'
|
||||
import { ImageKnife,ImageKnifeGlobal, ImageKnifeComponent, ImageKnifeOption } from '@ohos/libraryimageknife'
|
||||
import worker, { MessageEvents } from '@ohos.worker'
|
||||
import Prompt from '@system.prompt'
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {ImageKnife} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import ArkWorker from '@ohos.worker'
|
||||
import worker from '@ohos.worker'
|
||||
@Entry
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {BaseTransform} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {GrayscaleTransformation} from '@ohos/imageknife'
|
||||
import {SketchFilterTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {BaseTransform} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {GrayscaleTransformation} from '@ohos/libraryimageknife'
|
||||
import {SketchFilterTransformation} from '@ohos/libraryimageknife'
|
||||
import image from '@ohos.multimedia.image'
|
||||
|
||||
@Entry
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife} from '@ohos/imageknife'
|
||||
import {ScaleType} from '@ohos/imageknife'
|
||||
import {RotateImageTransformation} from '@ohos/imageknife'
|
||||
import {GrayscaleTransformation} from '@ohos/imageknife'
|
||||
import {SketchFilterTransformation} from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import {ImageKnife} from '@ohos/libraryimageknife'
|
||||
import {ScaleType} from '@ohos/libraryimageknife'
|
||||
import {RotateImageTransformation} from '@ohos/libraryimageknife'
|
||||
import {GrayscaleTransformation} from '@ohos/libraryimageknife'
|
||||
import {SketchFilterTransformation} from '@ohos/libraryimageknife'
|
||||
import ArkWorker from '@ohos.worker'
|
||||
import worker from '@ohos.worker'
|
||||
import {BaseTransform} from '@ohos/imageknife'
|
||||
import {BaseTransform} from '@ohos/libraryimageknife'
|
||||
import image from '@ohos.multimedia.image'
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -24,7 +24,7 @@ import {
|
|||
ScaleType,
|
||||
ImageKnifeGlobal,
|
||||
BaseTransform
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
import ArkWorker from '@ohos.worker'
|
||||
import worker from '@ohos.worker';
|
||||
import image from '@ohos.multimedia.image';
|
||||
|
|
|
@ -25,7 +25,7 @@ import {
|
|||
IDrawLifeCycle,
|
||||
ScaleType,
|
||||
ImageKnifeDrawFactory
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker';
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {ImageKnifeComponent} from '@ohos/imageknife'
|
||||
import {ImageKnifeData} from '@ohos/imageknife'
|
||||
import {ImageKnifeOption} from '@ohos/imageknife'
|
||||
import {RequestOption} from '@ohos/imageknife'
|
||||
import {ImageKnifeGlobal } from '@ohos/imageknife'
|
||||
import {ImageKnifeComponent} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeData} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeOption} from '@ohos/libraryimageknife'
|
||||
import {RequestOption} from '@ohos/libraryimageknife'
|
||||
import {ImageKnifeGlobal } from '@ohos/libraryimageknife'
|
||||
import worker from '@ohos.worker'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ImageKnifeComponent } from '@ohos/imageknife'
|
||||
import { ImageKnifeOption } from '@ohos/imageknife'
|
||||
import { ImageKnifeComponent } from '@ohos/libraryimageknife'
|
||||
import { ImageKnifeOption } from '@ohos/libraryimageknife'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
|
|
|
@ -12,28 +12,28 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { RequestOption,ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import { CropCircleTransformation } from '@ohos/imageknife'
|
||||
import { RoundedCornersTransformation } from '@ohos/imageknife'
|
||||
import { RequestOption,ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import { CropCircleTransformation } from '@ohos/libraryimageknife'
|
||||
import { RoundedCornersTransformation } from '@ohos/libraryimageknife'
|
||||
import {
|
||||
CropCircleWithBorderTransformation
|
||||
} from '@ohos/imageknife/src/main/ets/components/imageknife/transform/CropCircleWithBorderTransformation'
|
||||
import { RotateImageTransformation } from '@ohos/imageknife'
|
||||
import { CropSquareTransformation } from '@ohos/imageknife'
|
||||
import { CropTransformation } from '@ohos/imageknife'
|
||||
import { CropType } from '@ohos/imageknife'
|
||||
import { GrayscaleTransformation } from '@ohos/imageknife'
|
||||
import { BrightnessFilterTransformation } from '@ohos/imageknife'
|
||||
import { ContrastFilterTransformation } from '@ohos/imageknife'
|
||||
import { InvertFilterTransformation } from '@ohos/imageknife'
|
||||
import { SepiaFilterTransformation } from '@ohos/imageknife'
|
||||
import { SketchFilterTransformation } from '@ohos/imageknife'
|
||||
import { BlurTransformation } from '@ohos/imageknife'
|
||||
import { PixelationFilterTransformation } from '@ohos/imageknife'
|
||||
import { MaskTransformation } from '@ohos/imageknife'
|
||||
import { SwirlFilterTransformation } from '@ohos/imageknife'
|
||||
import { RotateImageTransformation } from '@ohos/libraryimageknife'
|
||||
import { CropSquareTransformation } from '@ohos/libraryimageknife'
|
||||
import { CropTransformation } from '@ohos/libraryimageknife'
|
||||
import { CropType } from '@ohos/libraryimageknife'
|
||||
import { GrayscaleTransformation } from '@ohos/libraryimageknife'
|
||||
import { BrightnessFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { ContrastFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { InvertFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { SepiaFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { SketchFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { BlurTransformation } from '@ohos/libraryimageknife'
|
||||
import { PixelationFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { MaskTransformation } from '@ohos/libraryimageknife'
|
||||
import { SwirlFilterTransformation } from '@ohos/libraryimageknife'
|
||||
import { BusinessError } from '@ohos.base'
|
||||
import {ImageKnifeData} from '@ohos/imageknife'
|
||||
import {ImageKnifeData} from '@ohos/libraryimageknife'
|
||||
/**
|
||||
* PixelMap transform 示例
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
import hilog from '@ohos.hilog';
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
|
||||
import {ImageKnife,ImageKnifeDrawFactory,ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife,ImageKnifeDrawFactory,ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
|
||||
export default function ImageKnifeTest() {
|
||||
describe('ImageKnifeTest', ()=> {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
import hilog from '@ohos.hilog';
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
|
||||
import {LogUtil} from '@ohos/imageknife'
|
||||
import {LogUtil} from '@ohos/libraryimageknife'
|
||||
|
||||
export default function LogUtilTest() {
|
||||
describe('LogUtilTest', ()=> {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
*/
|
||||
import hilog from '@ohos.hilog';
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
|
||||
import {LruCache} from '@ohos/imageknife' // DiskLruCache用例由DiskLruCache三方库提供
|
||||
import {LruCache} from '@ohos/libraryimageknife' // DiskLruCache用例由DiskLruCache三方库提供
|
||||
|
||||
export default function lruCacheTest() {
|
||||
describe('lruCacheTest', ()=> {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
import hilog from '@ohos.hilog';
|
||||
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
|
||||
import {RequestOption,Size} from '@ohos/imageknife'
|
||||
import {RequestOption,Size} from '@ohos/libraryimageknife'
|
||||
|
||||
export default function RequestOptionTest() {
|
||||
describe('RequestOptionTest', ()=> {
|
||||
|
|
|
@ -36,7 +36,7 @@ import {
|
|||
ToonFilterTransform,
|
||||
VignetteFilterTransform,
|
||||
|
||||
} from '@ohos/imageknife'
|
||||
} from '@ohos/libraryimageknife'
|
||||
|
||||
export default function Transform() {
|
||||
describe('Transform', ()=>{
|
||||
|
|
|
@ -18,7 +18,7 @@ import hilog from '@ohos.hilog';
|
|||
import { Hypium } from '@ohos/hypium';
|
||||
import testsuite from '../test/List.test';
|
||||
import window from '@ohos.window';
|
||||
import {ImageKnife,ImageKnifeDrawFactory,ImageKnifeGlobal} from '@ohos/imageknife'
|
||||
import {ImageKnife,ImageKnifeDrawFactory,ImageKnifeGlobal} from '@ohos/libraryimageknife'
|
||||
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
|
||||
import Want from '@ohos.app.ability.Want';
|
||||
import { BusinessError } from '@ohos.base'
|
||||
|
|
|
@ -96,6 +96,7 @@ export { UPNG } from './src/main/ets/components/3rd_party/upng/UPNG'
|
|||
export { ImageKnife } from './src/main/ets/components/imageknife/ImageKnife'
|
||||
export { ImageKnifeGlobal } from './src/main/ets/components/imageknife/ImageKnifeGlobal'
|
||||
export {RequestOption,Size} from './src/main/ets/components/imageknife/RequestOption'
|
||||
export {ObjectKey} from './src/main/ets/components/imageknife/ObjectKey'
|
||||
export { ImageKnifeComponent, ScaleType, ScaleTypeHelper } from './src/main/ets/components/imageknife/ImageKnifeComponent'
|
||||
export { ImageKnifeDrawFactory } from './src/main/ets/components/imageknife/ImageKnifeDrawFactory'
|
||||
export {ImageKnifeOption,CropCircleWithBorder,Crop,GifOptions,TransformOptions} from './src/main/ets/components/imageknife/ImageKnifeOption'
|
||||
|
|
|
@ -11,4 +11,124 @@
|
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
// ImageKnife 对外暴露的接口由library提供
|
||||
|
||||
/**
|
||||
* cache
|
||||
*/
|
||||
|
||||
export { FileUtils } from '@ohos/imageknife'
|
||||
export { Base64 } from '@ohos/imageknife'
|
||||
export { LruCache } from '@ohos/imageknife'
|
||||
export { DiskStrategy } from '@ohos/imageknife'
|
||||
export { ALL } from '@ohos/imageknife'
|
||||
export { AUTOMATIC } from '@ohos/imageknife'
|
||||
export { DATA } from '@ohos/imageknife'
|
||||
export { NONE } from '@ohos/imageknife'
|
||||
export { RESOURCE } from '@ohos/imageknife'
|
||||
export { EngineKeyInterface } from '@ohos/imageknife'
|
||||
export { EngineKeyFactories } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* compress
|
||||
*/
|
||||
export { CompressBuilder } from '@ohos/imageknife'
|
||||
export { OnCompressListener } from '@ohos/imageknife'
|
||||
export { OnRenameListener } from '@ohos/imageknife'
|
||||
export { CompressDataListener } from '@ohos/imageknife'
|
||||
export { CompressionPredicate } from '@ohos/imageknife'
|
||||
export { CompressAdapter } from '@ohos/imageknife'
|
||||
export { CompressProvider } from '@ohos/imageknife'
|
||||
export { DataStringPathProvider } from '@ohos/imageknife'
|
||||
export { RecourseProvider } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* crop
|
||||
*/
|
||||
|
||||
export { CropImage } from '@ohos/imageknife'
|
||||
export { CropOptions } from '@ohos/imageknife'
|
||||
export { PixelMapCrop,Options } from '@ohos/imageknife'
|
||||
export { CropCallback } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* transform
|
||||
*/
|
||||
export { BaseTransform } from '@ohos/imageknife'
|
||||
export { BlurTransformation } from '@ohos/imageknife'
|
||||
export { BrightnessFilterTransformation } from '@ohos/imageknife'
|
||||
export { ContrastFilterTransformation } from '@ohos/imageknife'
|
||||
export { CropCircleTransformation } from '@ohos/imageknife'
|
||||
export { CropCircleWithBorderTransformation,rgbColor } from '@ohos/imageknife'
|
||||
export { CropSquareTransformation } from '@ohos/imageknife'
|
||||
export { CropTransformation,CropType } from '@ohos/imageknife'
|
||||
export { GrayscaleTransformation } from '@ohos/imageknife'
|
||||
export { InvertFilterTransformation } from '@ohos/imageknife'
|
||||
export { PixelationFilterTransformation } from '@ohos/imageknife'
|
||||
export { RotateImageTransformation } from '@ohos/imageknife'
|
||||
export { RoundedCornersTransformation,RoundCorner } from '@ohos/imageknife'
|
||||
export { SepiaFilterTransformation } from '@ohos/imageknife'
|
||||
export { SketchFilterTransformation } from '@ohos/imageknife'
|
||||
export { MaskTransformation } from '@ohos/imageknife'
|
||||
export { SwirlFilterTransformation } from '@ohos/imageknife'
|
||||
export { KuwaharaFilterTransform } from '@ohos/imageknife'
|
||||
export { ToonFilterTransform } from '@ohos/imageknife'
|
||||
export { VignetteFilterTransform } from '@ohos/imageknife'
|
||||
export { TransformUtils } from '@ohos/imageknife'
|
||||
export { TransformType } from '@ohos/imageknife'
|
||||
export { CenterCrop } from '@ohos/imageknife'
|
||||
export { CenterInside } from '@ohos/imageknife'
|
||||
export { FitCenter } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* pngj
|
||||
*/
|
||||
export { Pngj } from '@ohos/imageknife'
|
||||
export {handler} from '@ohos/imageknife'
|
||||
export { UPNG } from '@ohos/imageknife'
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ImageKnife
|
||||
*/
|
||||
export { ImageKnife } from '@ohos/imageknife'
|
||||
export { ImageKnifeGlobal } from '@ohos/imageknife'
|
||||
export {RequestOption,Size} from '@ohos/imageknife'
|
||||
export {ObjectKey} from '@ohos/imageknife'
|
||||
export { ImageKnifeComponent, ScaleType, ScaleTypeHelper } from '@ohos/imageknife'
|
||||
export { ImageKnifeDrawFactory } from '@ohos/imageknife'
|
||||
export {ImageKnifeOption,CropCircleWithBorder,Crop,GifOptions,TransformOptions} from '@ohos/imageknife'
|
||||
export { ImageKnifeData } from '@ohos/imageknife'
|
||||
export {IAllCacheInfoCallback,AllCacheInfo,ResourceCacheInfo,MemoryCacheInfo,DataCacheInfo} from '@ohos/imageknife'
|
||||
export {IParseImage} from '@ohos/imageknife'
|
||||
export {IDataFetch} from '@ohos/imageknife'
|
||||
export {ICache} from '@ohos/imageknife'
|
||||
export { FileTypeUtil } from '@ohos/imageknife'
|
||||
export { ParseImageUtil } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* svg parse
|
||||
*/
|
||||
export { SVGParseImpl } from '@ohos/imageknife'
|
||||
|
||||
/**
|
||||
* gif parse
|
||||
*/
|
||||
export { GIFParseImpl } from '@ohos/imageknife'
|
||||
export { GIFFrame } from '@ohos/imageknife'
|
||||
// 能力增强worker 解析GIF数据
|
||||
export { gifHandler } from '@ohos/imageknife'
|
||||
|
||||
// 自定义组件新增
|
||||
// 自定义组件绘制生命周期
|
||||
export { IDrawLifeCycle } from '@ohos/imageknife'
|
||||
|
||||
// 日志管理
|
||||
export { LogUtil } from '@ohos/imageknife'
|
||||
|
||||
// 额外开放初始化ImageKnife的方法
|
||||
export {InitImageKnife} from './src/main/ets/pages/InitImageKnife'
|
|
@ -0,0 +1,8 @@
|
|||
import common from '@ohos.app.ability.common'
|
||||
import { ImageKnifeComponent, ImageKnifeOption, FileUtils } from '@ohos/imageknife'
|
||||
import { ImageKnifeGlobal,ImageKnife,ImageKnifeDrawFactory,LogUtil } from '@ohos/imageknife'
|
||||
export class InitImageKnife{
|
||||
static init(entryContext:common.UIAbilityContext){
|
||||
ImageKnife.with(entryContext);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue