{"id":29079558,"url":"https://github.com/markusfisch/scalingimageview","last_synced_at":"2026-03-12T22:32:41.274Z","repository":{"id":139268505,"uuid":"47081045","full_name":"markusfisch/ScalingImageView","owner":"markusfisch","description":"Android ImageView that transforms its drawable according to user input","archived":false,"fork":false,"pushed_at":"2025-07-29T13:17:42.000Z","size":3171,"stargazers_count":15,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-29T15:52:11.891Z","etag":null,"topics":["android-library","imageview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markusfisch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-29T21:28:34.000Z","updated_at":"2025-07-29T13:17:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"e187feb7-9831-4e04-8c06-8a753d43ed6c","html_url":"https://github.com/markusfisch/ScalingImageView","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/markusfisch/ScalingImageView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusfisch%2FScalingImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusfisch%2FScalingImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusfisch%2FScalingImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusfisch%2FScalingImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markusfisch","download_url":"https://codeload.github.com/markusfisch/ScalingImageView/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markusfisch%2FScalingImageView/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30446445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"ssl_error","status_checked_at":"2026-03-12T21:30:43.161Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-library","imageview"],"created_at":"2025-06-27T17:06:32.265Z","updated_at":"2026-03-12T22:32:41.266Z","avatar_url":"https://github.com/markusfisch.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScalingImageView\n\nAn ImageView that transforms its drawable according to touch input.\n\nSupports rotated images and keeps transformation when you exchange the\nimage for another one with a different size.\n\nAll of that in ~400 lines of code (excluding blanks and comments).\n\n![Screencast](http://markusfisch.github.io/ScalingImageView/screencast.gif)\n\n## How to include\n\n### Gradle\n\nAdd the JitPack repository in your root build.gradle at the end of\nrepositories:\n\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://jitpack.io' }\n\t\t}\n\t}\n\nThen add the dependency in your app/build.gradle:\n\n\tdependencies {\n\t\timplementation 'com.github.markusfisch:ScalingImageView:x.x.x'\n\t}\n\n### Android Archive\n\nAlternatively you may just download the latest `aar` from\n[Releases](https://github.com/markusfisch/ScalingImageView/releases) and put it\ninto `app/libs` in your app.\n\nThen make sure your `app/build.gradle` contains the following line in the\n`dependencies` block:\n\n\tdependencies {\n\t\timplementation fileTree(dir: 'libs', include: '*')\n\t\t...\n\t}\n\n## How to use\n\nMaybe in a layout:\n\n\t\u003cde.markusfisch.android.scalingimageview.widget.ScalingImageView\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"match_parent\"\n\t\tandroid:src=\"@drawable/your_drawable\"/\u003e\n\nOr from java:\n\n\timport de.markusfisch.android.scalingimageview.widget.ScalingImageView;\n\n\tScalingImageView scalingImageView = new ScalingImageView(context);\n\nChanging the scale type must happen in source since reading attributes\nwould require a [declare-styleable][styleable] resource and some overhead\nI think would outweigh its value for this.\n\nSo you need to call `setScaleType()`:\n\n\tscalingImageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n\nOnly `CENTER`, `CENTER_CROP` and `CENTER_INSIDE` are supported.\n`CENTER_INSIDE` is the default.\n\nPlease note that using `android:adjustViewBounds=\"true\"` will implicitly\nset ScaleType to `FIT_CENTER` what is not supported and will result in an\nUnsupportedOperationException.\n\n## Supported Scale Types\n\n### [ImageView.ScaleType.CENTER][scaletype]\n\n\u003e Center the image in the view, but perform no scaling.\n\n\t    +-------+ FRAME\n\t    |       |\n\t  +-|-------|-+\n\t  | | IMAGE | |\n\t  +-|-------|-+\n\t    |       |\n\t    +-------+\n\n### [ImageView.ScaleType.CENTER_CROP][scaletype]\n\n\u003e Scale the image uniformly (maintain the image's aspect ratio) so that both\n\u003e dimensions (width and height) of the image will be equal to or larger than\n\u003e the corresponding dimension of the view.\n\n\t      FRAME\n\t+---+-------+---+\n\t|   |       |   |\n\t|   |       |   |\n\t| I |M  A  G| E |\n\t|   |       |   |\n\t|   |       |   |\n\t+---+-------+---+\n\n### [ImageView.ScaleType.CENTER_INSIDE][scaletype]\n\n\u003e Scale the image uniformly (maintain the image's aspect ratio) so that both\n\u003e dimensions (width and height) of the image will be equal to or less than the\n\u003e corresponding dimension of the view.\n\n\t    +-------+ FRAME\n\t    |       |\n\t    +-------+\n\t    | IMAGE |\n\t    +-------+\n\t    |       |\n\t    +-------+\n\n## Image Rotation\n\nYou can either set any image rotation (in degrees) at any time with\n`setImageRotation()`:\n\n\tscalingImageView.setImageRotation(90f);\n\nOr allow the user to freely rotate the image with `setFreeRotation()`:\n\n\tscalingImageView.setFreeRotation(true);\n\nIf you want to know the angle and pivot of the rotation, you can use\n`getImageRotation()`, `getPivotX()` and `getPivotY()`. Just make sure to\nalways invoke `getImageRotation()` first as it also updates the pivot point.\n\n## Demo\n\nIn app/ you'll find a demo.\nEither import it into Android Studio or, if you're not on that thing from\nRedmond, just type make to build, install and run.\n\n## License\n\nThis widget is so basic, it should be Public Domain. And it is.\n\n[scaletype]: https://developer.android.com/reference/android/widget/ImageView.ScaleType.html\n[styleable]: https://developer.android.com/training/custom-views/create-view.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusfisch%2Fscalingimageview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkusfisch%2Fscalingimageview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkusfisch%2Fscalingimageview/lists"}