[CREATE] OpenRaster clarifications

Martin Renold martinxyz at gmx.ch
Thu Jun 18 10:30:30 PDT 2009


On Thu, Jun 18, 2009 at 06:23:38PM +0300, calle at luolamies.org wrote:
> I can still see a need for the size attributes in the <image> tag when the
> desired canvas size is greater than the bounding rectangle of the layers

I was more thinking about the opposite usecase (layers larger than canvas).

> 1. What if the defined size is smaller than the computed one? (Perhaps the
> size should be treated as a minimum size?)

It's a crop. The user can move layers that extend beyond it back into the
image. It's the "page size".

> 2. What to do with uncovered areas? (Filled with transparent pixels is
> probably the standard action)

Yes.

> 3. Are the x & y coordinates needed? Are there any cases where it would
> be needed to set these to something else than what can be computed
> from the layer positions?

No, they are useless. I was thinking first you would just take (x, y, w, h)
and crop the contents of <image> to that.  But "x" and "y" specify by
convention the position where the current element should be placed.  Adding
"w" and "h" to that concept will always crop the content at (0, 0).

The consistent solution would be to disallow all of x, y, w, h in the
<image> tag and require an explicit crop filter instead, but I think this
can stay a special case because most applications have the concept of a
canvas size.

Let's remove "x" and "y" from the toplevel <image> tag, and add only "w" and
"h" instead.  I will change this in the wiki if nobody objects, and describe
its meaning as above.

And should this canvas width and height be mandatory? This would allow
preview widgets to display the size easily.

> I think this is a fairly common feature. Most programs, including GIMP and
> Krita, have it. In my opinion, the best way would be to just add a boolean
> hidden attribute.

You are right of course, I was talking nonsense. For some silly reason I
thought you wanted to stash them away from the layer list GUI.

bye,
Martin


More information about the CREATE mailing list