paparazzi
paparazzi copied to clipboard
Support custom thumbnail scale
Currently Paparazzi
limits thumbnail size (I suppose for saving space).
But there's some tasks where it is not a good approach:
-
Paparazzi
can be used for screenshot generation (that's my case) - I suppose current behavior will drastically affect long screenshots image quality
This PR adds new API.
You can prodvide instance of ThumbnailScale
into Paparazzi
constructor.
ThumbnailScale
can be:
-
NoScale
- image would not be scaled at all -
ScaleMaxSideTo
- current behavior. Image will be scaled for max side to be no longer thanScaleMaxSideTo.size
.
I think accomplishes the same as my PR https://github.com/cashapp/paparazzi/pull/543
In case someone wants to use this PR before it is merged, I've published release 1.3.1 with this PR applied.
Add this repo to your settings.gradle.kts
like this:
dependencyResolutionManagement {
repositories {
/// ...
maven("https://maven.pkg.github.com/IlyaGulya/paparazzi") {
name = "github"
credentials(PasswordCredentials::class.java)
}
}
}
pluginManagement {
repositories {
/// ...
maven("https://maven.pkg.github.com/IlyaGulya/paparazzi") {
name = "github"
credentials(PasswordCredentials::class.java)
}
}
}
And add your username and fine-grained personal access token to your gradle.properties
:
githubUsername=YOUR_USERNAME
githubPassword=YOUR_PERSONAL_ACCESS_TOKEN
After that you can use 1.3.1-thumbnail-scale-5
as paparazzi plugin version:
plugins {
id("app.cash.paparazzi") version "1.3.1-thumbnail-scale-5"
}