Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seandenigris/simpleimagemorph
https://github.com/seandenigris/simpleimagemorph
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/seandenigris/simpleimagemorph
- Owner: seandenigris
- License: mit
- Created: 2015-02-21T20:01:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-08T17:17:14.000Z (almost 10 years ago)
- Last Synced: 2024-10-08T20:21:42.228Z (3 months ago)
- Language: Smalltalk
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleImageMorph
## Problem
Squeak/Pharo's ImageMorph act strangely when resized. They wrap themselves in aTransformMorph, which replaces the ImageMorph in the World and shows a scaled view of it. This is conceptually elegant - the ImageMorph and everything connected with it e.g. submorphs stay their "real size", like looking at a physical object through a magnifying glass. However, from a user perspective, it's jarring to have the thing you're dealing with replaced out from under you. It can also create problems: try copying a scaled ImageMorph's submorph via the halos and BOOM... MNU.## Solution
Rather than emulating the physical world at this low level i.e. using a tool to change the view on a physical object, it may be simpler to create a new concept that empowers the computer by harnessing the possibility of the computer to transcend physical laws. So I propose a magical image - one that seems on the surface to be just like a physical photograph, but in fact can be stretched like taffy.##Installation
The code is hosted on SmalltalkHub. Load with:
```
Gofer it
smalltalkhubUser: 'SeanDeNigris' project: 'SeansPlayground';
package: 'SimpleImageMorph';
load.
```## Features
- No more TransformMorphs: You are always dealing with the same Morph now.
- Aspect ratio fixable: Send #fixAspectRatio or #freeAspectRatio to specify whether image should keep its current proportions
- Original Form Intact: Unlike some previous naive attempts, the original form is never altered during resizes. Only its projection on the canvas is transformed. So the quality of the image is still not effected by infinite resizes.