diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index 6d37d6c..70fa217 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -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" } } diff --git a/entry/src/main/ets/entryability/CustomEngineKeyImpl.ets b/entry/src/main/ets/entryability/CustomEngineKeyImpl.ets index 45d3300..81a6863 100644 --- a/entry/src/main/ets/entryability/CustomEngineKeyImpl.ets +++ b/entry/src/main/ets/entryability/CustomEngineKeyImpl.ets @@ -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; diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index c3d114b..3e816e7 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -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) { diff --git a/entry/src/main/ets/pages/CacheRuleChangedPage.ets b/entry/src/main/ets/pages/CacheRuleChangedPage.ets index a5592c9..ce1ef94 100644 --- a/entry/src/main/ets/pages/CacheRuleChangedPage.ets +++ b/entry/src/main/ets/pages/CacheRuleChangedPage.ets @@ -17,7 +17,7 @@ import { ImageKnifeOption, RotateImageTransformation, RoundedCornersTransformation -} from '@ohos/imageknife' +} from '@ohos/libraryimageknife' @Entry @Component diff --git a/entry/src/main/ets/pages/OptionTestPage.ets b/entry/src/main/ets/pages/OptionTestPage.ets index 1c19004..6f7f6e2 100644 --- a/entry/src/main/ets/pages/OptionTestPage.ets +++ b/entry/src/main/ets/pages/OptionTestPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/SignatureTestPage.ets b/entry/src/main/ets/pages/SignatureTestPage.ets index f2a2551..177061d 100644 --- a/entry/src/main/ets/pages/SignatureTestPage.ets +++ b/entry/src/main/ets/pages/SignatureTestPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/basicTestFeatureAbilityPage.ets b/entry/src/main/ets/pages/basicTestFeatureAbilityPage.ets index fb31384..cc787cc 100644 --- a/entry/src/main/ets/pages/basicTestFeatureAbilityPage.ets +++ b/entry/src/main/ets/pages/basicTestFeatureAbilityPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/basicTestFileIOPage.ets b/entry/src/main/ets/pages/basicTestFileIOPage.ets index aabc863..e8f468c 100644 --- a/entry/src/main/ets/pages/basicTestFileIOPage.ets +++ b/entry/src/main/ets/pages/basicTestFileIOPage.ets @@ -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'; diff --git a/entry/src/main/ets/pages/basicTestMediaImage.ets b/entry/src/main/ets/pages/basicTestMediaImage.ets index 089eec6..e448f79 100644 --- a/entry/src/main/ets/pages/basicTestMediaImage.ets +++ b/entry/src/main/ets/pages/basicTestMediaImage.ets @@ -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 diff --git a/entry/src/main/ets/pages/basicTestResourceManagerPage.ets b/entry/src/main/ets/pages/basicTestResourceManagerPage.ets index edc59e8..509dd53 100644 --- a/entry/src/main/ets/pages/basicTestResourceManagerPage.ets +++ b/entry/src/main/ets/pages/basicTestResourceManagerPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/compressPage.ets b/entry/src/main/ets/pages/compressPage.ets index b76a7ba..578840a 100644 --- a/entry/src/main/ets/pages/compressPage.ets +++ b/entry/src/main/ets/pages/compressPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/cropImagePage2.ets b/entry/src/main/ets/pages/cropImagePage2.ets index fc76184..df4ad5d 100644 --- a/entry/src/main/ets/pages/cropImagePage2.ets +++ b/entry/src/main/ets/pages/cropImagePage2.ets @@ -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' diff --git a/entry/src/main/ets/pages/dataShareUriLoadPage.ets b/entry/src/main/ets/pages/dataShareUriLoadPage.ets index 2a22952..fd3859f 100644 --- a/entry/src/main/ets/pages/dataShareUriLoadPage.ets +++ b/entry/src/main/ets/pages/dataShareUriLoadPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/drawFactoryTestPage.ets b/entry/src/main/ets/pages/drawFactoryTestPage.ets index 24bbb35..433475b 100644 --- a/entry/src/main/ets/pages/drawFactoryTestPage.ets +++ b/entry/src/main/ets/pages/drawFactoryTestPage.ets @@ -18,7 +18,7 @@ import { ImageKnifeOption, ImageKnifeDrawFactory, ScaleType -} from '@ohos/imageknife' +} from '@ohos/libraryimageknife' @Entry @Component diff --git a/entry/src/main/ets/pages/frescoRetryTestCasePage.ets b/entry/src/main/ets/pages/frescoRetryTestCasePage.ets index b44bfba..c6ae9d5 100644 --- a/entry/src/main/ets/pages/frescoRetryTestCasePage.ets +++ b/entry/src/main/ets/pages/frescoRetryTestCasePage.ets @@ -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 diff --git a/entry/src/main/ets/pages/gifTestCasePage.ets b/entry/src/main/ets/pages/gifTestCasePage.ets index 771a395..d45ffa3 100644 --- a/entry/src/main/ets/pages/gifTestCasePage.ets +++ b/entry/src/main/ets/pages/gifTestCasePage.ets @@ -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' diff --git a/entry/src/main/ets/pages/hspCacheTestPage.ets b/entry/src/main/ets/pages/hspCacheTestPage.ets index f5a981c..000f881 100644 --- a/entry/src/main/ets/pages/hspCacheTestPage.ets +++ b/entry/src/main/ets/pages/hspCacheTestPage.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { ImageKnifeComponent, ImageKnifeOption, FileUtils } from '@ohos/imageknife' +import { ImageKnifeComponent, ImageKnifeOption, FileUtils } from '@ohos/libraryimageknife' @Entry @Component diff --git a/entry/src/main/ets/pages/index.ets b/entry/src/main/ets/pages/index.ets index 7d6dd99..9043edd 100644 --- a/entry/src/main/ets/pages/index.ets +++ b/entry/src/main/ets/pages/index.ets @@ -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'; diff --git a/entry/src/main/ets/pages/manyPhotoShowPage.ets b/entry/src/main/ets/pages/manyPhotoShowPage.ets index ed8d488..2a1e8b6 100644 --- a/entry/src/main/ets/pages/manyPhotoShowPage.ets +++ b/entry/src/main/ets/pages/manyPhotoShowPage.ets @@ -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' diff --git a/entry/src/main/ets/pages/pngjTestCasePage.ets b/entry/src/main/ets/pages/pngjTestCasePage.ets index 390ddae..d1bcab9 100644 --- a/entry/src/main/ets/pages/pngjTestCasePage.ets +++ b/entry/src/main/ets/pages/pngjTestCasePage.ets @@ -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'; diff --git a/entry/src/main/ets/pages/showErrorholderTestCasePage.ets b/entry/src/main/ets/pages/showErrorholderTestCasePage.ets index ad82adf..15ea013 100644 --- a/entry/src/main/ets/pages/showErrorholderTestCasePage.ets +++ b/entry/src/main/ets/pages/showErrorholderTestCasePage.ets @@ -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 diff --git a/entry/src/main/ets/pages/storageTestLruCache.ets b/entry/src/main/ets/pages/storageTestLruCache.ets index abe8e07..018c002 100644 --- a/entry/src/main/ets/pages/storageTestLruCache.ets +++ b/entry/src/main/ets/pages/storageTestLruCache.ets @@ -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); diff --git a/entry/src/main/ets/pages/svgTestCasePage.ets b/entry/src/main/ets/pages/svgTestCasePage.ets index 6157a96..edcd299 100644 --- a/entry/src/main/ets/pages/svgTestCasePage.ets +++ b/entry/src/main/ets/pages/svgTestCasePage.ets @@ -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'; diff --git a/entry/src/main/ets/pages/tempUrlTestPage.ets b/entry/src/main/ets/pages/tempUrlTestPage.ets index 3353fdc..8057c30 100644 --- a/entry/src/main/ets/pages/tempUrlTestPage.ets +++ b/entry/src/main/ets/pages/tempUrlTestPage.ets @@ -20,7 +20,7 @@ import { ImageKnife, ImageKnifeDrawFactory, ScaleType -} from '@ohos/imageknife' +} from '@ohos/libraryimageknife' import worker from '@ohos.worker'; @Entry @Component diff --git a/entry/src/main/ets/pages/testAllCacheInfoPage.ets b/entry/src/main/ets/pages/testAllCacheInfoPage.ets index 9d5003f..f39920a 100644 --- a/entry/src/main/ets/pages/testAllCacheInfoPage.ets +++ b/entry/src/main/ets/pages/testAllCacheInfoPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/testGifDontAnimatePage.ets b/entry/src/main/ets/pages/testGifDontAnimatePage.ets index 69a56cc..3ba4ae7 100644 --- a/entry/src/main/ets/pages/testGifDontAnimatePage.ets +++ b/entry/src/main/ets/pages/testGifDontAnimatePage.ets @@ -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 diff --git a/entry/src/main/ets/pages/testGifLoadWithWorkerPage.ets b/entry/src/main/ets/pages/testGifLoadWithWorkerPage.ets index 3f044a4..5753429 100644 --- a/entry/src/main/ets/pages/testGifLoadWithWorkerPage.ets +++ b/entry/src/main/ets/pages/testGifLoadWithWorkerPage.ets @@ -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' diff --git a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage.ets b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage.ets index 687a98b..8298de4 100644 --- a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage.ets +++ b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage2.ets b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage2.ets index 1966689..44c646f 100644 --- a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage2.ets +++ b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage2.ets @@ -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 diff --git a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage3.ets b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage3.ets index 8871b1a..0079d94 100644 --- a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage3.ets +++ b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage3.ets @@ -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 diff --git a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage4.ets b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage4.ets index 5585b14..fd11e45 100644 --- a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage4.ets +++ b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage4.ets @@ -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'; diff --git a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage5.ets b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage5.ets index ef672cd..d3de95f 100644 --- a/entry/src/main/ets/pages/testImageKnifeOptionChangedPage5.ets +++ b/entry/src/main/ets/pages/testImageKnifeOptionChangedPage5.ets @@ -25,7 +25,7 @@ import { IDrawLifeCycle, ScaleType, ImageKnifeDrawFactory -} from '@ohos/imageknife' +} from '@ohos/libraryimageknife' import worker from '@ohos.worker'; @Entry @Component diff --git a/entry/src/main/ets/pages/testPreloadPage.ets b/entry/src/main/ets/pages/testPreloadPage.ets index 7924e71..f8e1098 100644 --- a/entry/src/main/ets/pages/testPreloadPage.ets +++ b/entry/src/main/ets/pages/testPreloadPage.ets @@ -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' diff --git a/entry/src/main/ets/pages/testSingleFrameGifPage.ets b/entry/src/main/ets/pages/testSingleFrameGifPage.ets index 0e292c6..7e7a8f7 100644 --- a/entry/src/main/ets/pages/testSingleFrameGifPage.ets +++ b/entry/src/main/ets/pages/testSingleFrameGifPage.ets @@ -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 diff --git a/entry/src/main/ets/pages/transformPixelMapPage.ets b/entry/src/main/ets/pages/transformPixelMapPage.ets index e9cabbb..96d47d7 100644 --- a/entry/src/main/ets/pages/transformPixelMapPage.ets +++ b/entry/src/main/ets/pages/transformPixelMapPage.ets @@ -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 示例 */ diff --git a/entry/src/ohosTest/ets/test/imageknife.test.ets b/entry/src/ohosTest/ets/test/imageknife.test.ets index 368a7a6..2186d29 100644 --- a/entry/src/ohosTest/ets/test/imageknife.test.ets +++ b/entry/src/ohosTest/ets/test/imageknife.test.ets @@ -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', ()=> { diff --git a/entry/src/ohosTest/ets/test/logutil.test.ets b/entry/src/ohosTest/ets/test/logutil.test.ets index 71f61a1..4ab90ac 100644 --- a/entry/src/ohosTest/ets/test/logutil.test.ets +++ b/entry/src/ohosTest/ets/test/logutil.test.ets @@ -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', ()=> { diff --git a/entry/src/ohosTest/ets/test/lrucache.test.ets b/entry/src/ohosTest/ets/test/lrucache.test.ets index 3238954..b5ef887 100644 --- a/entry/src/ohosTest/ets/test/lrucache.test.ets +++ b/entry/src/ohosTest/ets/test/lrucache.test.ets @@ -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', ()=> { diff --git a/entry/src/ohosTest/ets/test/requestoption.test.ets b/entry/src/ohosTest/ets/test/requestoption.test.ets index e2b0621..b83bd10 100644 --- a/entry/src/ohosTest/ets/test/requestoption.test.ets +++ b/entry/src/ohosTest/ets/test/requestoption.test.ets @@ -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', ()=> { diff --git a/entry/src/ohosTest/ets/test/transfrom.test.ets b/entry/src/ohosTest/ets/test/transfrom.test.ets index 8802154..c1b1e8c 100644 --- a/entry/src/ohosTest/ets/test/transfrom.test.ets +++ b/entry/src/ohosTest/ets/test/transfrom.test.ets @@ -36,7 +36,7 @@ import { ToonFilterTransform, VignetteFilterTransform, -} from '@ohos/imageknife' +} from '@ohos/libraryimageknife' export default function Transform() { describe('Transform', ()=>{ diff --git a/entry/src/ohosTest/ets/testability/TestAbility.ets b/entry/src/ohosTest/ets/testability/TestAbility.ets index 22b0877..140dbda 100644 --- a/entry/src/ohosTest/ets/testability/TestAbility.ets +++ b/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -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' diff --git a/imageknife/index.ets b/imageknife/index.ets index 739c6ca..624208a 100644 --- a/imageknife/index.ets +++ b/imageknife/index.ets @@ -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' diff --git a/library/src/main/ets/Index.ets b/library/src/main/ets/Index.ets index f99aa38..1b34845 100644 --- a/library/src/main/ets/Index.ets +++ b/library/src/main/ets/Index.ets @@ -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. - */ \ No newline at end of file + */ + + +// 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' \ No newline at end of file diff --git a/library/src/main/ets/pages/InitImageKnife.ets b/library/src/main/ets/pages/InitImageKnife.ets new file mode 100644 index 0000000..b05c84f --- /dev/null +++ b/library/src/main/ets/pages/InitImageKnife.ets @@ -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); + } +} \ No newline at end of file