{"id":15107720,"url":"https://github.com/pablo1n7/imageform","last_synced_at":"2025-10-23T02:31:34.069Z","repository":{"id":82031188,"uuid":"234327472","full_name":"pablo1n7/ImageForm","owner":"pablo1n7","description":"Small Lib for basic Image processing.","archived":false,"fork":false,"pushed_at":"2020-02-14T14:19:07.000Z","size":2918,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-25T21:41:07.545Z","etag":null,"topics":["image-processing","pharo","pharo-smalltalk"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pablo1n7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2020-01-16T13:34:59.000Z","updated_at":"2022-12-05T11:59:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"602c2ee0-c21d-4c56-8e41-c172236ec85e","html_url":"https://github.com/pablo1n7/ImageForm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo1n7%2FImageForm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo1n7%2FImageForm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo1n7%2FImageForm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo1n7%2FImageForm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablo1n7","download_url":"https://codeload.github.com/pablo1n7/ImageForm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219871956,"owners_count":16554471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["image-processing","pharo","pharo-smalltalk"],"created_at":"2024-09-25T21:41:13.183Z","updated_at":"2025-10-23T02:31:33.226Z","avatar_url":"https://github.com/pablo1n7.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/pablo1n7/ImageForm.svg?branch=master)](https://travis-ci.org/pablo1n7/ImageForm)\n\n# ImageForm\n\nSmall Lib for basic Image processing. Programmed in Pharo for Pharo :) \n\n# Install\n\n```smalltalk\nMetacello new\n  baseline: #ImageForm;\n  repository: 'github://pablo1n7/ImageForm/src';\n  load.\n```\n\n# Basic Operations\n\n## Open an Image.\n\n```smalltalk\nanImage := ImageForm open: '/Users/sdas/Documents/pwq7S.jpg'.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S.jpg\"\u003e\n\u003c/p\u003e\n\n## Show Image.\n```smalltalk\nanImage show: 'Eileen Collins'.\n```\n![](https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/show.jpg)\n\n## Save Image.\n```smalltalk\naScaledImage save:'/Users/pablo/Documents/Pharo/pwq7S_scaled.jpg'.\naScaledImage save:'/Users/pablo/Documents/Pharo/pwq7S_scaled.png'.\n```\n\n# Color Operations\n\n## Transform to Gray Scale.\n```smalltalk\naGrayImage := anImage asGrayScale \n```\nor\n\n```smalltalk\naGrayImage := ImageFormGrayScale open: '/Users/sdas/Documents/pwq7S.jpg'.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_gray.jpg\"\u003e\n\u003c/p\u003e\n\n## Lighter Image.\n```smalltalk\naLighterImage := anImageForm lighter:0.25.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_lighter.jpg\"\u003e\n\u003c/p\u003e\n\n## Darker Image.\n```smalltalk\naDarkerImage := anImageForm darker:0.25.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_darker.jpg\"\u003e\n\u003c/p\u003e\n\n## Negated Image.\n```smalltalk\naNegatedImage := anImage negated .\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_negated.png\"\u003e\n\u003c/p\u003e\n\n# Image Transformations.\n\n## Flip Image.\n```smalltalk\naFlippedImage := anImage flipHorizontally.\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_flipHorizontally.jpg\"\u003e\n\u003c/p\u003e\n\n```smalltalk\naFlippedImage := anImage flipVertically.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_flipVertically.jpg\"\u003e\n\u003c/p\u003e\n\n## Rotate Image.\n```smalltalk\naRotatedImage := anImage rotateBy: 45.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg  src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_rotated45.png\"\u003e\n\u003c/p\u003e\n\n```smalltalk\naRotatedImage := anImage rotateBy: #left centerAt: 0@0. \n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_rotatedLeft.jpg\"\u003e\n\u003c/p\u003e\n\n## Scale Image.\n```smalltalk\naScaledImage := anImageA scaled: 100 height: 100. \n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_scaled.jpg\"\u003e\n\u003c/p\u003e\n\n## Crop Image.\n```smalltalk\naCroppedImage := anImageForm crop: 0@0 h: 300  w: 500.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_crop.jpg\"\u003e\n\u003c/p\u003e\n\n\n# Basic Arithmetics.\n```smalltalk\nanImageA := ImageForm open: '/Users/sdas/Documents/pwq7S.jpg'.\nanImageB := ImageForm open: '/Users/sdas/Documents/pharo.png'.\n\naSubResult := anImageB - anImageA.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_sub.png\"\u003e\n\u003c/p\u003e\n\n```smalltalk\naSumResult := anImageB + anImageA.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_sum.png\"\u003e\n\u003c/p\u003e\n\n# Advanced Operations\n## Operations with kernels (3x3 and 5x5)\n\n```smalltalk\nanImage := ImageForm open: '/Users/pablo/Documents/pharo/pharo.png'.\naGaussianKernel := {{ 1/256. 4/256. 6/256. 4/256. 1/256. }. \n\t\t    { 4/256. 16/256. 24/256. 16/256. 4/256.}. \n\t\t    { 6/256. 24/256. 36/256. 24/256. 6/256. }. \n\t\t    { 4/256. 16/256. 24/256. 16/256. 4/256. }. \n\t\t    { 1/256. 4/256. 6/256. 4/256. 1/256. }.}.\naResult := anImage applyKernel:  aGaussianKernel flattened .\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pwq7S_gaussian.png\"\u003e\n\u003c/p\u003e\n\n\n```smalltalk\nanImage := ImageForm open: '/Users/pablo/Documents/pharo/pharo.png'.\naGrayImage := anImage asGrayScale.\naSobelKernel := {{-0.1. -0.1. -0.1}. \n\t\t { -0.1. 0.80. -0.1}. \n\t\t {-0.1. -0.1. -0.1}}.\naResult := aGrayImage applyKernel:  aSobelKernel flattened .\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/pharo_sobel.png\"\u003e\n\u003c/p\u003e\n\n# Gray Scale Operations\n\n```smalltalk\nanImage := ImageForm open: '/Users/pablo/Documents/pharo/icon.png'.\naGrayImage := anImage asGrayScale.\n```\n\n## Transform to Binary Image.\n\n```smalltalk\n aBinaryImage := aGrayImage asBinaryImage: 0.1.\n```\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/binary.png\"\u003e\n\u003c/p\u003e\n\n\n## Erosion.\n\n```smalltalk\nanErosionImage := aBinaryImage erosion: ImageFormGrayScale squareKernel3x3 iterations: 6.\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/erosion.png\"\u003e\n\u003c/p\u003e\n\n## Dilation.\n\n```smalltalk\nanDilationImage := aBinaryImage dilation: ImageFormGrayScale squareKernel3x3 iterations: 6.\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pablo1n7/ImageForm/master/examples/dilation.png\"\u003e\n\u003c/p\u003e\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo1n7%2Fimageform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablo1n7%2Fimageform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo1n7%2Fimageform/lists"}