Image Rehab (Composition by smokris)

Author: smokris
License: MIT
Date: 2010.02.07
Compatibility: 10.5, 10.6
Categories:
Required plugins:
(none)

Core Image is incredibly powerful, but sometimes produces images with non-obvious properties. Image Rehab attempts to clean up some of these properties.

  • Image Origin is restored to (0,0) — potentially useful after cropping an image.
  • Unbounded Images are trimmed to the dimensions of the Rendering Destination.
PreviewAttachmentSize
Image Rehab.qtz5.35 KB

bbinkovitz's picture
Re: Image Rehab (Composition by smokris)

Forgive me if this is a tediously obvious thing, but what exactly does this do? I assumed it would do something like center an image for cropping but that doesn't appear to be the purpose. Could you provide an example of when this would be useful? (Or "before" and "after" shots maybe?)

smokris's picture
Re: Image Rehab (Composition by smokris)

It's meant to be used after cropping (or any other image operation that would result in a nonzero origin).

Say, for example, if you create a Sunbeams and set the center to (0,0). You get an image whose origin is negative:

Running it through Rehab resets the origin to zero:

Useful when doing further compositing work with the image.

bbinkovitz's picture
Re: Image Rehab (Composition by smokris)

I did that, but when I, say, rotated a cropped image it rotated about the same point as the uncropped one. What am I doing wrong? (I know that's hard to answer without the composition, but I kernel panicked while doing it and now it's gone)

dust's picture
Re: Image Rehab (Composition by smokris)

cool seems useful. misleading by the title. i initially thought this was to be some sort of restoration patch but i'm all about trying to tidy up the editor so im sure someday i will find this useful. i find there are times when i don't want to reset to 0,0 primarily within the a mouse x,y coordinate system or something. like leaving an object where you dragged it but this im sure will provide cure a un foreseen headache.

smokris's picture
Re: Image Rehab (Composition by smokris)

When you rotate an image using Image Transform, the rotational anchor point is specified by the "Origin X"/"Y" inputs on that patch, regardless of where the origin of the itself is. Confusing.

[Edit: actually, on 10.6 at least, Image Transform seems to have some nasty bugs. See the attached composition --- it's supposed to rotate. On my machine, it just gets larger and smaller (..?) without rotating. But if I enable "Native Core Image Rendering", it does actually rotate. Can anyone confirm this?]

PreviewAttachmentSize
imagetransform-rotate-bug.qtz3.39 KB

cybero's picture
Re: Image Rehab (Composition by smokris)

Confirmed buggy zooming instead of rotate on 10.6.2 sans Native Core Image Rendering.

Also can confirm that flagging Crop Images to Visible Area whilst leaving unflagged Native Core Image Rendering will also give a rotation from the transform image patch correctly.

Doesn't work with Sprite or Sphere or I guess any other x, y, z rotation patch although it does render aok to a Rutt Etra render patch

cwright's picture
Re: Image Rehab (Composition by smokris)

Please file a bug report for this bug, and attach the composition used, as well as concise steps to reproduce it.

smokris's picture
Re: Image Rehab (Composition by smokris)

Filed radar 7648068.