Skip to content

Commit

Permalink
release: v4.0.0-beta01
Browse files Browse the repository at this point in the history
  • Loading branch information
panpf committed Nov 7, 2024
1 parent 43e59a7 commit 2b888b2
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 99 deletions.
141 changes: 87 additions & 54 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,110 @@ Translations: [简体中文](CHANGELOG_zh.md)
> 2. The maven groupId is upgraded to `io.github.panpf.sketch4`, so versions 2.\* and 3.\* will not
prompt for upgrade.

# new
# 4.0.0-beta01

core:

* fix: Fix the bug that the image cannot be loaded when the ImageView is attached to the window but
the size is null due to padding. [#208](https://github.com/panpf/sketch/issues/208)
* fix: Fixed CircleCrop, Rotate, RoundedCorners Transformation not working in RGB_565
bug. [#209](https://github.com/panpf/sketch/issues/209)
* fix: Fixed the bug that the equals method of RingProgressDrawable, SectorProgressDrawable,
RingProgressPainter, SectorProgressPainter did not execute as
expected. [#210](https://github.com/panpf/sketch/issues/210)
* fix: Fix the bug that the filterQuality parameter of AsyncImage is
invalid. [#211](https://github.com/panpf/sketch/issues/211)
* fix: Fixed the bug that Transformations such as blur and rotate on the Android platform did not
keep the ColorSpace unchanged. [#213](https://github.com/panpf/sketch/issues/213)
* fix: Fixed the bug of setting repeatCount for animations on non-Android platforms and not staying
at the last frame after playing, but staying at the first
frame. [#212](https://github.com/panpf/sketch/issues/212)
* fix: Fixed the bug that GifDrawable and MovieDrawable could not correctly apply
animatedTransformation. [#214](https://github.com/panpf/sketch/issues/214)
* fix: Fixed the bug that the repeatCount setting of GifDrawableDecoder should be increased by 1 by
mistake. [#215](https://github.com/panpf/sketch/issues/215)
* remove: Remove ComposeBitmapImage
* remove: Remove Image.getPixels()
* remove: Remove the AnyThread, MainThread, IntRange, and IntDef annotations under the '
com.github.panpf.sketch.annotation' package and use the alternatives under the '
androidx.annotation' package
* change: SkiaBitmapImage is now cached in the memory cache on non-Android platforms, not
ComposeBitmapImage.
* change: The parameter passed in Fetcher.Factory.create() is changed to RequestContext
* change: Merge AndroidBitmapImage and SkiaBitmapImage into BitmapImage
* change: DrawableEqualizer renamed to EquitableDrawable
* change: Remove AndroidBitmap, SkiBitmap, SkiaImageInfo, SkiaImage, SkiaRect
* change: SkiaAnimatedImage renamed to AnimatedImage
* change: ImageRequest's registerListener and registerProgressListener methods renamed to
addListener and addProgressListener
* new: Added ComponentLoader, which supports automatic detection and registration of Fetcher and
Decoder components. All components in the built-in module are supported.

compose:

* fix: Fix the bug that the filterQuality parameter of AsyncImage is
invalid. [#211](https://github.com/panpf/sketch/issues/211)
* remove: Remove ComposeBitmapImage
* remove: Remove PainterState.Empty
* change: PainterEqualizer renamed to EquitablePainter
* change: ComposeImagePainter renamed to ImageBitmapPainter, SkiaAnimatedImagePainter renamed to
AnimatedImagePainter

view:

* fix: Fix the bug that the image cannot be loaded when the ImageView is attached to the window but
size is null due to padding. [#208](https://github.com/panpf/sketch/issues/208)

decode:

* change: Decoder's decode() method removes the suspend modifier and changes the return type from
Result<DecodeResult> to DecodeResult
* change: Transformation's transform() method removes the suspend modifier
* change: BitmapConfig refactored to BitmapColorType
* new: Non-Android platforms now also support ColorType
* new: Non-Android platforms now also support ColorSpace
* new: DrawableDecoder supports colorSpace

fetch:

* change: The parameter passed in Fetcher.Factory.create() is changed to RequestContext

cache:

* change: SkiaBitmapImage is now cached in the memory cache on non-Android platforms, not
ComposeBitmapImage.
* change: The default memory cache size is now 256MB for desktop and web platforms and 128MB for ios
platforms
* change: BitmapConfig refactored to BitmapColorType
* change: Merge AndroidBitmapImage and SkiaBitmapImage into BitmapImage
* change: The setHttpHeader method of ImageRequest.Builder and ImageOptions.Builder is renamed to
httpHeader
* change: DrawableEqualizer and PainterEqualizer changed to EquitableDrawable and EquitablePainter
* change: The type of error attribute of ImageRequest and ImageOptions changed from ErrorImageState
to StateImage
* change: ErrorImageState is refactored into ConditionStateImage, and ConditionStateImage can be
used in placeholder and fallback
* change: Remove PainterState.Empty
* change: Removed AndroidBitmap, SkiBitmap, SkiaImageInfo, SkiaImage, SkiaRect, and renamed
ComposeImagePainter to ImageBitmapPainter, SkiaAnimatedImage renamed to AnimatedImage,
SkiaAnimatedImagePainter renamed to AnimatedImagePainter
* change: ImageRequest's registerListener and registerProgressListener methods renamed to
addListener and addProgressListener

http:

* remove: Removed the setHttpHeader() and addHttpHeader() methods of ImageRequest.Builder and
ImageOptions.Builder
* change: Remove the sketch-http-core module, add the sketch-http-hurl module, rename the
sketch-http-ktor module to sketch-http-ktor2 and wasmJs is no longer supported, add the
sketch-http-ktor module to sketch-http-ktor2 and no longer support wasmJs, add the
sketch-http-ktor3 module

animated:

* fix: Fixed the bug that on non-Android platforms, animations set repeatCount and do not stay on
the last frame after playing, but stay on the first
frame. [#212](https://github.com/panpf/sketch/issues/212)
* fix: Fixed the bug that GifDrawable and MovieDrawable could not apply animatedTransformation
correctly. [#214](https://github.com/panpf/sketch/issues/214)
* fix: Fixed the bug that the repeatCount setting of GifDrawableDecoder should be increased by 1 by
mistake. [#215](https://github.com/panpf/sketch/issues/215)
* change: Split the sketch-animated module into sketch-animated-core and sketch-animated-gif,
sketch-animated-webp, sketch-animated-heif, sketch-animated-koralgif module and rename it to
sketch-animated-gif-koral
* change: Split sketch-extensions-apkicon and sketch-extensions-appicon module from the
sketch-extensions-core module
* improve: animatedTransformation now supports non-Android platforms

transformation:

* fix: Fix the bug that CircleCrop, Rotate, RoundedCorners Transformation does not work at
RGB_565. [#209](https://github.com/panpf/sketch/issues/209)
* fix: Fixed the bug that Transformations such as blur and rotate on the Android platform did not
keep the ColorSpace unchanged. [#213](https://github.com/panpf/sketch/issues/213)
* change: Transformation's transform() method removes the suspend modifier

state:

* change: The type of error attribute of ImageRequest and ImageOptions changed from ErrorImageState
to StateImage
* change: ErrorImageState is refactored into ConditionStateImage, and ConditionStateImage can be
used in placeholder and fallback
* improve: Improve IconDrawable, support fixed-size background and restrict icons to have fixed
sizes or specify iconSize
* improve: Improve IconPainter, support fixed-size background and restrict icons to have fixed
sizes or specify iconSize
* new: Non-Android platforms now also support ColorType
* new: Non-Android platforms now also support ColorSpace
* new: DrawableDecoder supports colorSpace
* improve: Improve IconPainter, support fixed-size background and restrict icons to have fixed sizes
or specify iconSize
* new: Added 'Drawable.asStateImage(Any)' and 'ColorDrawable.asStateImage()' extension functions
* new: animatedTransformation now supports non-Android platforms
* new: Added ComponentLoader to support automatic detection and registration of components
* new: The Fetcher component carried by the sketch-http-\* module supports automatic registration.
* new: The Decoder component carried by the sketch-animated-\* module supports automatic
registration.
* new: The Fetcher component carried by the sketch-compose-resources module supports automatic
registration

extensions:

* fix: Fixed the bug that the equals method of RingProgressDrawable, SectorProgressDrawable,
RingProgressPainter, SectorProgressPainter did not execute as
expected. [#210](https://github.com/panpf/sketch/issues/210)
* change: Split the sketch-extensions-apkicon and sketch-extensions-appicon modules from the
sketch-extensions-core module

other:

* depend: Upgrade kotlin 2.0.21, kotlinx coroutines 1.9.0
* depend: Upgrade jetbrains compose 1.7.0, jetbrains lifecycle 2.8.3

Expand Down
117 changes: 73 additions & 44 deletions CHANGELOG_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,95 @@
> 1. 4.x 版本为兼容 Compose Multiplatform 而进行了大量破坏性重构和简化,不兼容 3.x 版本
> 2. maven groupId 升级为 `io.github.panpf.sketch4`,因此 2.\*、3.\* 版本不会提示升级
# new
# 4.0.0-beta01

core:

* remove: 删除 Image.getPixels()
* remove: 移除 'com.github.panpf.sketch.annotation' 包下的 AnyThread、MainThread、IntRange、IntDef
注解,使用 'androidx.annotation' 包下的替代
* change: 合并 AndroidBitmapImage 和 SkiaBitmapImage 为 BitmapImage
* change: DrawableEqualizer 重命名为 EquitableDrawable
* change: 移除 AndroidBitmap、SkiBitmap、SkiaImageInfo、SkiaImage、SkiaRect
* change: SkiaAnimatedImage 重命名为 AnimatedImage
* change: ImageRequest 的 registerListener 和 registerProgressListener 方法重命名为 addListener 和
addProgressListener
* new: 新增 ComponentLoader,支持自动探测并注册 Fetcher 和 Decoder 组件,所有自带模块里的组件都已支持

compose:

* fix: 修复当 ImageView 已附到窗口但是因 padding 导致 size 为 null 时无法加载图片的
bug。 [#208](https://github.com/panpf/sketch/issues/208)
* fix: 修复 CircleCrop、Rotate、RoundedCorners Transformation 在 RGB_565 时不工作的
bug。 [#209](https://github.com/panpf/sketch/issues/209)
* fix: 修复 RingProgressDrawable, SectorProgressDrawable, RingProgressPainter, SectorProgressPainter
的 equals 方法未按预期执行的 bug。 [#210](https://github.com/panpf/sketch/issues/210)
* fix: 修复 AsyncImage 的 filterQuality 参数无效的
bug。 [#211](https://github.com/panpf/sketch/issues/211)
* fix: 修复 Android 平台上 blur、rotate 等 Transformation 没有保持 ColorSpace 不变的
bug。 [#213](https://github.com/panpf/sketch/issues/213)
* remove: 移除 ComposeBitmapImage
* change: 移除 PainterState.Empty
* change: PainterEqualizer 重命名为 EquitablePainter
* change: ComposeImagePainter 重命名为 ImageBitmapPainter、SkiaAnimatedImagePainter 重命名为
AnimatedImagePainter

view:
* fix: 修复当 ImageView 已附到窗口但是因 padding 导致 size 为 null 时无法加载图片的
bug。 [#208](https://github.com/panpf/sketch/issues/208)

decode:

* change: Decoder 的 decode() 方法移除 suspend 修饰符并且返回类型从 Result<DecodeResult> 改为
DecodeResult
* change: BitmapConfig 重构为 BitmapColorType
* new: 非安卓平台现在也支持 ColorType 了
* new: 非安卓平台现在也支持 ColorSpace 了
* new: DrawableDecoder 支持 colorSpace

fetch:

* change: Fetcher.Factory.create() 的传参改为 RequestContext

cache:

* change: 现在非安卓平台上内存缓存中缓存的是 SkiaBitmapImage,不再是 ComposeBitmapImage
* change: 桌面和 web 平台的默认内存缓存大小现在是 256MB,ios 平台是 128MB

http:

* remove: 移除 ImageRequest.Builder 和 ImageOptions.Builder 的 setHttpHeader() 和 addHttpHeader() 方法
* change: 移除 sketch-http-core 模块,增加 sketch-http-hurl 模块,sketch-http-ktor 模块重命名为
sketch-http-ktor2 并且不再支持 wasmJs,增加 sketch-http-ktor3 模块

animated:
* fix: 修复非安卓平台上动图设置 repeatCount 并播放结束后没有停留在最后一帧,而停留在第一帧的
bug。 [#212](https://github.com/panpf/sketch/issues/212)
* fix: 修复 GifDrawable 和 MovieDrawable 无法正确应用 animatedTransformation 的
bug。 [#214](https://github.com/panpf/sketch/issues/214)
* fix: 修复 GifDrawableDecoder 的 repeatCount 设置错误应该加 1 的
bug。 [#215](https://github.com/panpf/sketch/issues/215)
* remove: 移除 ComposeBitmapImage
* remove: 删除 Image.getPixels()
* remove: 移除 'com.github.panpf.sketch.annotation' 包下的 AnyThread、MainThread、IntRange、IntDef
注解,使用 'androidx.annotation' 包下的替代
* change: 现在非安卓平台上内存缓存中缓存的是 SkiaBitmapImage,不再是 ComposeBitmapImage
* change: Fetcher.Factory.create() 的传参改为 RequestContext
* change: Decoder 的 decode() 方法移除 suspend 修饰符并且返回类型从 Result<DecodeResult> 改为
DecodeResult
* change: 拆分 sketch-animated 模块为 sketch-animated-core 和
sketch-animated-gif、sketch-animated-webp、sketch-animated-heif, sketch-animated-koralgif 模块重命名为
sketch-animated-gif-koral
* improve: animatedTransformation 现在支持非 Android 平台

transformation:

* fix: 修复 CircleCrop、Rotate、RoundedCorners Transformation 在 RGB_565 时不工作的
bug。 [#209](https://github.com/panpf/sketch/issues/209)
* fix: 修复 Android 平台上 blur、rotate 等 Transformation 没有保持 ColorSpace 不变的
bug。 [#213](https://github.com/panpf/sketch/issues/213)
* change: Transformation 的 transform() 方法移除 suspend 修饰符
* change: 桌面和 web 平台的默认内存缓存大小现在是 256MB,ios 平台是 128MB
* change: BitmapConfig 重构为 BitmapColorType
* change: 合并 AndroidBitmapImage 和 SkiaBitmapImage 为 BitmapImage
* change: ImageRequest.Builder 和 ImageOptions.Builder 的 setHttpHeader 方法重命名为 httpHeader
* change: DrawableEqualizer 和 PainterEqualizer 改为 EquitableDrawable 和 EquitablePainter

state:
* change: ImageRequest 和 ImageOptions 的 error 属性的类型从 ErrorImageState 改为 StateImage
* change: ErrorImageState 重构为 ConditionStateImage,并且 ConditionStateImage 可以用在 placeholder 和
fallback
* change: 移除 PainterState.Empty
* change: 移除 AndroidBitmap、SkiBitmap、SkiaImageInfo、SkiaImage、SkiaRect,ComposeImagePainter 重命名为
ImageBitmapPainter、SkiaAnimatedImage 重命名为 AnimatedImage、SkiaAnimatedImagePainter 重命名为
AnimatedImagePainter
* change: ImageRequest 的 registerListener 和 registerProgressListener 方法重命名为 addListener 和
addProgressListener
* change: 移除 sketch-http-core 模块,增加 sketch-http-hurl 模块,sketch-http-ktor 模块重命名为
sketch-http-ktor2 并且不再支持 wasmJs,增加 sketch-http-ktor3 模块
* change: 拆分 sketch-animated 模块为 sketch-animated-core 和
sketch-animated-gif、sketch-animated-webp、sketch-animated-heif, sketch-animated-koralgif 模块重命名为
sketch-animated-gif-koral
* change: 从 sketch-extensions-core 模块中拆分出 sketch-extensions-apkicon 和
sketch-extensions-appicon
模块
* improve: 改进 IconDrawable,支持有固定大小的 background 并且限制 icon 必须有固定尺寸或指定 iconSize
* improve: 改进 IconPainter,支持有固定大小的 background 并且限制 icon 必须有固定尺寸或指定 iconSize
* new: 非安卓平台现在也支持 ColorType 了
* new: 非安卓平台现在也支持 ColorSpace 了
* new: DrawableDecoder 支持 colorSpace
* new: 新增 'Drawable.asStateImage(Any)' 和 'ColorDrawable.asStateImage()' 扩展函数
* new: animatedTransformation 现在支持非 Android 平台
* new: 新增 ComponentLoader,支持自动探测并注册组件
* new: sketch-http-\* 模块携带的 Fetcher 组件支持自动注册
* new: sketch-animated-\* 模块携带的 Decoder 组件支持自动注册
* new: sketch-compose-resources 模块携带的 Fetcher 组件支持自动注册

extensions:

* fix: 修复 RingProgressDrawable, SectorProgressDrawable, RingProgressPainter, SectorProgressPainter
的 equals 方法未按预期执行的 bug。 [#210](https://github.com/panpf/sketch/issues/210)
* change: 从 sketch-extensions-core 模块中拆分出 sketch-extensions-apkicon 和
sketch-extensions-appicon 模块

other:
* depend: 升级 kotlin 2.0.21, kotlinx coroutines 1.9.0
* depend: 升级 jetbrains compose 1.7.0, jetbrains lifecycle 2.8.3

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ minSdk=21
targetSdk=28
compileSdk=34
versionCode=4009
versionName=4.0.0-beta01-SNAPSHOT
versionName=4.0.0-beta01
#
#------------------------------------------ publish config ----------------------------------------#
GROUP=io.github.panpf.sketch4
Expand Down

0 comments on commit 2b888b2

Please sign in to comment.