Cantor-SAGE: Display image

Martin Küttler martin.kuettler at
Thu Jun 9 22:22:52 CEST 2011

On Thu, Jun 9, 2011 at 9:16 PM, Alexander Rieder
<alexanderrieder at> wrote:
> Hi,
> On Wed, Jun 8, 2011 at 8:29 PM, Uwe Fechner <u.fechner at> wrote:
>>  Hello,
>> my current idea:
>> Modify Cantor in such a way, that it also monitors the "current
>> directory" for new graphic
>> files, and displays them.
> I don't really like the idea, as I can see it lead to very unexpected
> behaviour, for example if you start cantor from your home,
> and are downloading some files at the same time. Every image you save
> while cantor is running popping up in your worksheet
> is not something an average user(or anybody else) would expect.
> I basically see three possibilities to fix your problem:
> - add a new type of worksheet entry that lets you insert any image
> files you want/modify the Richtext Entry
> - add some regexp magic that detects if the command you run is saving
> an image, and insert it as a result to that command (possibly hard to
> get right)
> - add a custom command e.g. cantor_display("imagefile"), that adds the
> image as a result

I am currently working on the first solution, and I think I can upload
some working code rather soon. I fear it's not going to be as nice
under the hood as I'd like it to be, but then again there is some time
until the code freeze is over, anyway :)

Best regards,
Martin Küttler

>> But then I have some more questions:
>> - what is the best graphic format for the integration in Cantor documents?
> I don't think there is a "best" image format. Cantor suports every
> image format supported by your Qt install. From a personal experience
> png works everywhere, and is better suited for plots than jpeg.
> Additionally Cantor supports to display Vector graphics in .eps
> format. If it is supported by the backend to generate it, I
> personally like that solution most, as it will allow arbitrary
> resizing, and works well together with LaTeX.
>> - should pictures be re-sized? If yes, which is the best resolution?
> I don't know about resizing. Cantor inserts the images in their
> original size, so just use whatever looks good.
> best regards,
> Alexander Rieder
> _______________________________________________
> kde-edu mailing list
> kde-edu at

More information about the kde-edu mailing list