Git Product home page Git Product logo

coil-transformations's Introduction

Commit451

Finds and prints the 451st commit message of a repo if it exists

Usage

./commit451.sh https://gitlab.com/Commit451/LabCoat.git

Why?

Just cause

coil-transformations's People

Contributors

bonepeople avatar brady-aiello avatar jawnnypoo avatar xanscale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

coil-transformations's Issues

[Security] Repository is vulnerable to MavenGate

https://blog.oversecured.com/Introducing-MavenGate-a-supply-chain-attack-method-for-Java-and-Android-applications/

Gradle task

./gradlew --write-verification-metadata pgp,sha256 --export-keys
 <component group="com.github.Commit451.coil-transformations" name="transformations" version="2.0.2">
         <artifact name="transformations-2.0.2.aar">
            <sha256 value="adbec226ce2c3a78b5e242e960971649b502cf3274aae421c48edd6bb94c7f56" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
         <artifact name="transformations-2.0.2.module">
            <sha256 value="58392a2a62b37ea8289a4633f9e4566c84ba5637806e6abbba87f14fac081aa4" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>

did not find a pgp public key in a remote repository or the artifact is not signed.
A fix is to:

  1. Start signing all artifacts, if not signed yet
  2. Upload a public pgp key used for signing artifacts to multiple public pgp repositories: https://keys.openpgp.org | https://pgp.mit.edu | https://keyserver.ubuntu.com/

Face Detection Transformation not in any library

Hi,
I would like to know which library to import for Face Detection Transformation. It is not currently in any given libraries and I can't find any face detection separate library on jitpack.

Transformations from base library and GPU library don't load

Hi, i can apply transformations that are already supported in Coil itself well, but when i try to load from the base library (transformations) and from GPU library the picture is not loaded

                    image.load("url_pic") {
                        transformations(VignetteFilterTransformation(applicationContext))
                    }

Tested with Android 6.0.1

Adding BlurTransformation that was removed in Coil 2.0

Coil 2.0 alpha has BlurTransformation removed from the library.
The authors recommend copy-pasting source code to the project for those who relied on it, however BlurTransformation used deprecated APIs and internal methods heavily, many of which were removed, essentially making this advice impossible to follow.

It would be nice to have this library add an updated version of BlurTransformation and GrayscaleTransformation to help those who relied on them before.

CropTransformation not cropping

hi,

i just tested the crop transformation and i get the same result for type top, center and bottom. also nothing gets cropped
image

i apply them like this
binding.image.load(url){transformations(CropTransformation(CropTransformation.CropType.TOP)) }

coil version is 2.5.0
lib version is 2.0.2

lg

new transformations

 class FitWidthCrop : Transformation {

        override val cacheKey: String = javaClass.name

        override suspend fun transform(input: Bitmap, size: Size): Bitmap {
            val srcWidth: Int = input.width
            val srcHeight: Int = input.height
            val (outputWidth, outputHeight) = calculateOutputSize(input, size)
            val sR = srcHeight.toFloat().div(srcWidth)
            val oR = outputHeight.toFloat().div(outputWidth)
            if (sR <= oR) {
                return input
            }
            val scale = srcWidth.toFloat().div(outputWidth)
            val newOutputHeight = outputHeight.times(scale).roundToInt()
            val y = srcHeight.minus(newOutputHeight).div(2)
            return Bitmap.createBitmap(input, 0, y, srcWidth, newOutputHeight)
        }

        override fun equals(other: Any?) = other is CircleCropTransformation

        override fun hashCode() = javaClass.hashCode()

        private fun calculateOutputSize(input: Bitmap, size: Size): Pair<Int, Int> {
            if (size.isOriginal) {
                return input.width to input.height
            }

            val (dstWidth, dstHeight) = size
            if (dstWidth is Dimension.Pixels && dstHeight is Dimension.Pixels) {
                return dstWidth.px to dstHeight.px
            }

            val multiplier = DecodeUtils.computeSizeMultiplier(
                srcWidth = input.width,
                srcHeight = input.height,
                dstWidth = size.width.pxOrElse { Int.MIN_VALUE },
                dstHeight = size.height.pxOrElse { Int.MIN_VALUE },
                scale = Scale.FILL
            )
            val outputWidth = (multiplier * input.width).roundToInt()
            val outputHeight = (multiplier * input.height).roundToInt()
            return outputWidth to outputHeight
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.