Can we get rid of Image Span?


First, I can’t find anywhere that uses this term “image span”, and I just can remember TV (screen) size that is measured by the diagonal of the image rectangle.

However, even in this application, the diagonal value is measured in inches not in a peculiar ‘unit’ (1 ‘unit’ = 60 pixels). At least in USA, Brazil, France and Spain.

Furthermore, Synfig uses “image span” basically for image resize constraints.
I wonder who actually resizes a project trying to keep the diagonal size (the image span) instead of the keeping either image or display aspect ratio.

By the code side, I ran git grep get_span and got:
synfig-core/src/synfig/renddesc.cpp: float old_span=get_span();
synfig-core/src/synfig/renddesc.cpp: float old_span=get_span();
synfig-core/src/synfig/renddesc.cpp: Vector::value_type ratio=x/get_span();
synfig-core/src/synfig/renddesc.h: Real get_span()const;
synfig-core/src/tool/joblistprocessor.cpp: job.desc.get_pixel_aspect(), job.desc.get_image_aspect(), job.desc.get_span());
synfig-core/src/tool/joblistprocessor.cpp: % job.desc.get_span()
synfig-core/src/tool/printing_functions.cpp: cout << “span” << “=” << rend_desc.get_span() << endl;
synfig-studio/src/gui/renddesc.cpp: adjustment_span->set_value(rend_desc_.get_span());

Therefore, we can see that, besides synfig-core/src/synfig/renddesc.{h,cpp}, RendDesc::get_span() is only used for printing RendDesc info.

Similar analysis can be made for set_span() :
synfig-core/src/synfig/renddesc.cpp: set_span(old_span);
synfig-core/src/synfig/renddesc.cpp: set_span(old_span);
synfig-core/src/synfig/renddesc.cpp:RendDesc::set_span(const Real &x)
synfig-core/src/synfig/renddesc.h: RendDesc& set_span(const Real &x);
synfig-core/src/tool/optionsprocessor.cpp: set_span(),
synfig-core/src/tool/optionsprocessor.cpp: add_option(og_set, “span”, ‘s’, set_span, (“Set the diagonal size of image window (Span)”), “NUM”);
synfig-core/src/tool/optionsprocessor.cpp: if (set_span > 0)
synfig-core/src/tool/optionsprocessor.cpp: span = set_span;
synfig-core/src/tool/optionsprocessor.cpp: desc.set_span(span);
synfig-core/src/tool/optionsprocessor.h: int set_span;
synfig-studio/src/gui/renddesc.cpp: rend_desc

Can we get rid of Image Span (and the image span resizing-lock feature)?
Maybe replace by “display aspect ratio”?


Because it may not be important in rendering the television standard. Preferable raw image.
You could work with ffmpeg rescaling video to pixel 1:1 -> 2:1
It is the solution that I used even with proprietary software.

ffmpeg .... -vf "setsar=1:1" ...
ffmpeg .... -vf "setsar=2:1" ...


Sorry I didn’t understand.
Are you ok to remove the image span locking?

Pixel aspect ratio (and locking) would still exist.


No, I’m sorry only it commented.
I exported in sequence of images and transcodificaba to pixel 2:1 of PAL-N


So you like a pixel size.
Wouldn’t it be better to set the pixel dimensions/pixel aspect ratio instead of setting how long is the pixel diagonal length? It could have any angle in this last case…


The topic of default options has been treated in this GitHub issue:

Such modifications will always do happy and unhappy people.
The best is to understand how Synfig works.
I will not add anything as I expressed my point of vue in the GitHub issue already :wink:


More simple example:

synfig file.sif -t ppm -o - | ppmtoy4m | y4mscaler -I sar=1:1 -O sar=NTSC  > NTSC.mpeg
synfig file.sif -t ppm -o - | ppmtoy4m | y4mscaler -I sar=1:1 -O sar=PAL  > PAL.mpeg


Hey, BobSynfig.

I already had seen that issue. AFAIK, your point of view is just let it the way it is, right?

I think that, as can be seen, it is very confusing for most people - and wiki even says:

Please note that since this dialog caused confusion, even among some very experienced people, here are some unofficial thoughts about image dimensions.

How about at least change/improve the terms?

  • Image -> Canvas (or just keep image)

    • Image size -> Canvas size
    • Image aspect -> Canvas aspect ratio
  • Image area -> Viewport / camera ?

    • Image span -> change it to “Viewport aspect ratio”
    • Top left : keep it ¹
    • Bottom right : keep it ¹

¹ but we can help user by letting him translate and scale viewport besides setting viewport rectangle coordinates

This way, I believe the wiki page about image resizing could be clearer:

Resizing the Canvas

  • Current: unlock everything and just set image width & height.
  • Proposal: diddo

Resizing the Canvas and keep aspect

  • Current: Lock “Image Aspect”, “Image Span”, “Pixel Aspect” and then set image width & height.
  • Proposal: Lock “image aspect ratio” and then set image width or height (they’re automatically linked).

Expanding the Canvas

  • Current: Lock “Pixel Aspect” and then set image width & height.
  • Proposal: Lock “viewport aspect ratio” and then set viewport width or height (they’re automatically linked).

Viewport data (top-left, bottom-right coordinates) would be set in pixel, not 1/60 pixels.


The problem is that Synfig is historicaly a vector software.
Canvas, image, viewport are different notions.
The image is the result if the canvas, but it can be rendered independantly, in any size.
No matter the original canvas size.
The origin of coordinate system is the centt of the canvas, should it be also transformed as cartesian system?


I know it’s a vector software :slight_smile: I’m used to Inkscape and Blender too.

By your definition of image, image span (a term that I only can see in Synfig) makes no sense.
It is the image diagonal length - and that should “equivalent” (actually, directly related/coupled) to image aspect ratio, since both refers to image word.
By “equivalent” I mean: if an image is 480x300px, its image span should be sqrt(480² + 300²), or, in strange unit thing, sqrt(8² + 5²).
If I resize image, the image span changes too - mandatory. But no, we can choose (thank you, Synfig :slight_smile: ).

The viewport definition I was using is the same for 3D CG and webbrowsers, as described in last paragraphs in Wikipedia article.

Regarding your definition of canvas, it has infinity size in Synfig and Inkscape. User can draw anywhere he wants, including outside of that chess-pattern rectangle in Synfig (and outside page in Inkscape).
This off-“main region” stuff wouldn’t be rendered/rasterized, though, because it will be clipped by a “camera” (that I wrongly called ‘viewport’ ¹, Synfig uses image area) and will be projected in image.

¹ it should be ‘world window’

I, and many users, think these terms are really confusing: image and image area don’t use “image” in the same concept/definition.
This presentation explains well these terms (look slides #3 and #5).

Regarding your question about coordinate system, nothing would change. Why would it?