[Cuis-dev] scaling an ImageMorph
Ezequiel Birman
ebirman77 at gmail.com
Sat Mar 22 09:49:31 PDT 2025
Missed one line:
filePath := '/Users/volkmannm/Pictures/images/altitude1600.jpg'.
>
form := Form fromFileNamed: filePath.
>
morph := ImageMorph newWith: form.
>
(morph scaleBy: 0.5; embeddedInMorphicWindowLabeled: 'test') openInWorld
--
Eze
On Sat, 22 Mar 2025 at 16:42, Ezequiel Birman <ebirman77 at gmail.com> wrote:
> Ah! I'd write something like:
>
>> filePath := '/Users/volkmannm/Pictures/images/altitude1600.jpg'.
>
> form := Form fromFileNamed: filePath.
>>
> (morph scaleBy: 0.5; embeddedInMorphicWindowLabeled: 'test') openInWorld
>
>
> On Sat, 22 Mar 2025 at 01:28, Mark Volkmann <r.mark.volkmann at gmail.com>
> wrote:
>
>> I want to render an image at some percentage less than 100% of its
>> default size.
>> I'm not trying to get an image to fill the extent of another morph.
>> This code, evaluated in a Workspace, renders an image at its full size.
>> What should I change to render it at 50% of that size?
>>
>> filePath := '/Users/volkmannm/Pictures/images/altitude1600.jpg'.
>> form := Form fromFileNamed: filePath.
>> morph := ImageMorph newWith: form.
>> SystemWindow new addMorph: morph; openInWorld.
>>
>> On Fri, Mar 21, 2025 at 3:02 PM Ezequiel Birman via Cuis-dev <
>> cuis-dev at lists.cuis.st> wrote:
>>
>>> errata: “self“ should be “anImageMorph”. I.e.:
>>>
>>> anImageMorph image: (anImage magnifyTo: anImageMorph morphExtent)
>>>
>>>
>>> On Fri, 21 Mar 2025 at 19:48, Ezequiel Birman <ebirman77 at gmail.com>
>>> wrote:
>>>
>>>> I'm not sure what are you trying to do but I'll guess that if you're
>>>> trying to get the image fill the morphExtent, you cand send `image:` to the
>>>> imageMorph.
>>>> anImageMorph image: (anImage magnifyTo: self morphExtent)
>>>>
>>>> HTH,
>>>>
>>>> --
>>>> Eze
>>>>
>>>> On Thu, 20 Mar 2025 at 09:00, Hilaire Fernandes via Cuis-dev <
>>>> cuis-dev at lists.cuis.st> wrote:
>>>>
>>>>> A remark, you should only magnify the form. Not sure it solves your
>>>>> problem, though
>>>>> Le 19/03/2025 à 22:11, Mark Volkmann via Cuis-dev a écrit :
>>>>>
>>>>> percent := 0.75.
>>>>> form := Form fromFileNamed: filePath :: magnifyBy: percent.
>>>>> morph := ImageMorph newWith: form :: scaleBy: percent.
>>>>>
>>>>> -- http://mamot.fr/@drgeo
>>>>>
>>>>> --
>>>>> Cuis-dev mailing list
>>>>> Cuis-dev at lists.cuis.st
>>>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>>>
>>>> --
>>> Cuis-dev mailing list
>>> Cuis-dev at lists.cuis.st
>>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>>
>>
>>
>> --
>> R. Mark Volkmann
>> Object Computing, Inc.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250322/c70ad7c1/attachment-0001.htm>
More information about the Cuis-dev
mailing list