Comments (11)
我看了下,确实是,只限制了不超过 view size,需要发新版解决
from sketch.
发了 3.2.4-SNAPSHOT 版本你试一下,要配置 maven 的快照仓库,确认可用我再合并到主分支发版
from sketch.
发了 3.2.4-SNAPSHOT 版本你试一下,要配置 maven 的快照仓库,确认可用我再合并到主分支发版
如何配置maven的快照仓库?可以提供资料参考吗
from sketch.
配置快照仓库地址:
maven { setUrl("https://s01.oss.sonatype.org/content/repositories/snapshots") }
然后依赖快照版本
implementation("io.github.panpf.sketch3:sketch:3.2.4-SNAPSHOT")
from sketch.
仍然无法解决
- 调用imageView.displayImage(drawableResId: Int)
以下是imageView:
<ImageView
android:id="@+id/imageView5"
android:layout_width="256dp"
android:layout_height="256dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView4" />
以下是资源:
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512.5,0C229.8,0 0.6,229.2 0.6,511.9c0,174.1 87,327.9 219.8,420.4 26,-90.5 91.8,-158.6 181.4,-189.5a331.4,331.4 0,0 1,8.6 -2.8c1.4,-0.4 2.7,-0.9 4.1,-1.3a323.1,323.1 0,0 1,12.8 -3.6l0.3,-0.1a327.1,327.1 0,0 1,12.9 -3c1.4,-0.3 2.8,-0.6 4.2,-0.8a341.3,341.3 0,0 1,14.2 -2.5,346.9 346.9,0 0,1 9.7,-1.4c1.4,-0.2 2.8,-0.4 4.3,-0.5a355.2,355.2 0,0 1,14 -1.4h18.5c1.9,0.1 3.8,0.1 5.7,0h1.5c-133.1,0 -241,-107.9 -241,-241 0,-1.3 0.1,-2.5 0.1,-3.8 -1.3,-152.4 141.5,-244.2 241.2,-237.4 102.3,-7 250,89.4 241.4,248.4 -0.3,0.2 -0.5,0.3 -0.8,0.4 -4,129.6 -110.3,233.4 -240.8,233.4h26c4.7,0.4 9.4,0.8 14,1.4 1.4,0.2 2.9,0.4 4.3,0.5a359.6,359.6 0,0 1,14.4 2.1c3.2,0.5 6.3,1.1 9.4,1.7 1.4,0.3 2.8,0.5 4.2,0.8a327.6,327.6 0,0 1,12.6 2.9c0.3,0.1 0.6,0.1 0.8,0.2a318.5,318.5 0,0 1,12.4 3.5c1.5,0.4 2.9,0.9 4.4,1.4 2.8,0.9 5.5,1.8 8.2,2.7 89.6,30.9 155.5,98.9 181.5,189.4 132.7,-92.5 219.6,-246.2 219.6,-420.3 0,-282.7 -229.2,-511.9 -511.9,-511.9z"
android:fillColor="#A6D4AE"/>
<path
android:pathData="M753.4,492.2c-70.7,43.2 -216.2,-31.6 -240.6,-134.7 -24.3,103.4 -170.6,178.4 -240.9,134.3a243.6,243.6 0,0 1,-0.3 -11c-0,1.3 -0.1,2.5 -0.1,3.8 0,133.1 107.9,241 241,241 130.6,0 236.8,-103.8 240.8,-233.4z"
android:fillColor="#FCE9EA"/>
<path
android:pathData="M623.3,742.8c0.9,0.3 1.8,0.6 2.7,1a119.6,119.6 0,0 1,-10.4 22.1c17.2,26.3 12.9,141.6 -12.9,123.4l-45.1,-31.7 -45,-31.7 3,-2.1c-1,0 -2,0.1 -3,0.1 -1,0 -2,-0.1 -3.1,-0.1l3,2.1 -45,31.7 -45.1,31.7c-25.8,18.2 -30.2,-97.3 -12.9,-123.5a119.7,119.7 0,0 1,-10.4 -22c0.9,-0.3 1.9,-0.7 2.8,-1 -89.6,30.9 -155.4,99 -181.4,189.5 82.8,57.7 183.5,91.5 292.1,91.5 108.7,0 209.4,-33.9 292.3,-91.7 -26,-90.5 -91.9,-158.6 -181.5,-189.4zM468.5,727.5c1.4,-0.2 2.8,-0.4 4.3,-0.5 -1.4,0.2 -2.8,0.4 -4.3,0.5zM454.1,729.6zM440.5,732.2c1.4,-0.3 2.8,-0.6 4.2,-0.8 -1.4,0.3 -2.8,0.5 -4.2,0.8zM427.3,735.2l0.3,-0.1c-0.1,0 -0.2,0 -0.3,0.1zM580.6,731.3c1.4,0.3 2.8,0.5 4.2,0.8 -1.4,-0.3 -2.8,-0.6 -4.2,-0.8zM610.7,738.7c1.5,0.4 2.9,0.9 4.4,1.4 -1.5,-0.5 -2.9,-0.9 -4.4,-1.4zM597.4,735.1c0.3,0.1 0.6,0.1 0.8,0.2 -0.3,-0.1 -0.6,-0.1 -0.8,-0.2zM410.4,740.1c1.4,-0.4 2.7,-0.9 4.1,-1.3 -1.4,0.4 -2.7,0.9 -4.1,1.3zM552.5,726.9c1.4,0.2 2.9,0.4 4.3,0.5 -1.4,-0.2 -2.8,-0.4 -4.3,-0.5zM566.5,728.8z"
android:fillColor="#F08E83"/>
<path
android:pathData="M409.4,765.8c3.4,-5.2 7.7,-6.9 12.9,-3.3l45.1,31.7 42,29.7c1,0 2,0.1 3.1,0.1 1,0 2,-0 3,-0.1l42,-29.7 45.1,-31.7c5.2,-3.6 9.5,-1.9 12.9,3.4a119.5,119.5 0,0 0,10.4 -22.1c-0.9,-0.3 -1.8,-0.6 -2.7,-1a325.8,325.8 0,0 0,-8.2 -2.7c-1.5,-0.5 -2.9,-0.9 -4.4,-1.4a320.5,320.5 0,0 0,-12.4 -3.5c-0.3,-0.1 -0.6,-0.1 -0.8,-0.2a329.4,329.4 0,0 0,-12.6 -2.9c-1.4,-0.3 -2.8,-0.6 -4.2,-0.8a336.5,336.5 0,0 0,-23.8 -3.9c-1.4,-0.2 -2.8,-0.4 -4.3,-0.5a355.8,355.8 0,0 0,-14 -1.4h-27.5c-1.9,0.1 -3.8,0.1 -5.7,0h-18.5a356.7,356.7 0,0 0,-14 1.4c-1.4,0.2 -2.8,0.4 -4.3,0.5 -3.2,0.4 -6.5,0.9 -9.7,1.4a346.3,346.3 0,0 0,-14.2 2.5c-1.4,0.3 -2.8,0.5 -4.2,0.8a327.1,327.1 0,0 0,-12.9 3l-0.3,0.1a338,338 0,0 0,-12.8 3.6c-1.4,0.4 -2.7,0.9 -4.1,1.3a316.1,316.1 0,0 0,-8.6 2.8c-0.9,0.3 -1.9,0.7 -2.8,1a119.5,119.5 0,0 0,10.4 22z"
android:fillColor="#FEFEFE"/>
<path
android:pathData="M602.6,762.5l-45.1,31.7 -42,29.7 -3,2.1 45,31.7 45.1,31.7c25.9,18.2 30.2,-97 12.9,-123.4 -3.4,-5.3 -7.8,-7 -12.9,-3.4zM422.3,762.5c-5.1,-3.6 -9.4,-1.9 -12.9,3.3 -17.3,26.1 -12.9,141.7 12.9,123.5l45.1,-31.7 45,-31.7 -3,-2.1 -42,-29.7 -45.1,-31.6z"
android:fillColor="#CFE07D"/>
<path
android:pathData="M512.8,357.5V243.4C413.1,236.6 270.3,328.4 271.6,480.8c0,3.6 0.1,7.3 0.3,11 70.3,44.2 216.6,-30.8 240.9,-134.3z"
android:fillColor="#ADBE20"/>
<path
android:pathData="M512.8,357.5c24.4,103.1 169.9,177.9 240.6,134.7 0.3,-0.2 0.5,-0.3 0.8,-0.4 8.6,-159 -139.1,-255.3 -241.4,-248.4v114.1z"
android:fillColor="#7EA701"/>
</vector>
使用原生的setImageResource显示正常。
使用displayImage和displayResourceImage模糊
from sketch.
我还以为你的是 svg 图片呢,原来是 vector 图片
现在 sketch 的逻辑是用 sketch 加载图片,只要不是动图最终都要转成 bitmap,因为 Transformation、缓存等功能都需要 bitmap,所以也会将 svg、vector 等转成 bitmap
我再研究看看能不能将 vector 转成高清的
from sketch.
是的,我也清楚是因为先转成bitmap再缩放了。看看能否支持vector图片,判断为vector后做另外的处理。
from sketch.
发布了新的 SNAPSHOT 版本,修复了此问题,你试试。貌似不用改版本号,重新同步一下就行
from sketch.
发布了新的 SNAPSHOT 版本,修复了此问题,你试试。貌似不用改版本号,重新同步一下就行
测试正常。
from sketch.
收到,马上发布正式版
from sketch.
已发布 3.2.4 正式版
from sketch.
Related Issues (20)
- 用了 crossfade() 进行占位图的切换 HOT 2
- AnimatedVectorDrawable in placeholder or error state is not working, even call start() before state change HOT 2
- Only support AnimatedImageDrawable HOT 4
- 日志没办法过滤的么,UriInvalidException: Request uri is empty or blank老是打印这个 HOT 2
- compose 版本无法加载webp和
- compose版本加载webp图片出现问题 HOT 5
- 有遗漏的异常未被捕获 HOT 21
- feat: 加载指定宽度,高度不定的小图片 HOT 11
- sketch 初始化能不能放出来,库里面集成没法在Application中配置 HOT 4
- 加载图片提示URI_INVALID HOT 1
- me.panpf:sketch-gif:2.7.1版本使用targetSdkVersion 31闪退 HOT 2
- such as Glide preloader HOT 1
- release 中的示例 apk 在启动时崩溃 HOT 3
- Missing licenses HOT 2
- [疑问] 在Compose的Lazy组件中, 可以实现滚动中暂停加载图片吗? HOT 2
- 加载图片出现 java.lang.NullPointerException: getHeaderField(...) must not be null HOT 2
- AsyncImage只设置宽度没有设置高度时无法显示图片 HOT 1
- 有的图片明明是正常的,它显示403 HOT 4
- 我想问下到底该如何删除指定key的缓存 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sketch.