On Sun, Feb 17, 2013 at 05:38:14PM -0600, Paul Archer wrote:
> I was just thinking: live preview with the overlay on is a lot slower,
> presumably because full-size images have to be rendered. It would be more
> work, but it would be a lot faster to use a reduced-resolution copy of the
> overlayed image--and if the image size is matched, there's no scaling
> required at render time.

Yep, the scenario during live view mode is to have 1 low res image, and
say 4 high res images below. The 1 low res image is the only thing updated
on each preview refresh. Currently the image display will re-render the
entire stack of images everytime 1 changes. What we need todo is to
pre-render the 4 high res images, and scale them down to match the 1
low res image. Then we only need to overlay 2 low images for each frame
drawn. As you say this will be quite alot more code todo.

> On Sun, Feb 17, 2013 at 3:29 PM, Paul Archer <p...@paularcher.org> wrote:
> 
> > I tried adding in a 'cairo_scale', which works. It does seem to slow
> > things down a little, but not horribly. That is, it's pretty slow to begin
> > with, when the overlay is on, so it doesn't make it much worse.
> > My big problem is I can't figure out how to find the right scale. I can
> > hard-code numbers, but that will only work with my particular model.
> >     cairo_t *cr = cairo_create(priv->pixmap);
> >     while (tmp) {
> >         image = ENTANGLE_IMAGE(tmp->data);
> >         pixbuf = entangle_image_get_pixbuf(image);
> >
> >         gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
> >         if (tmp == priv->images) {
> >             cairo_scale(cr,5,5);
> >             cairo_paint(cr);
> >         } else {
> >             cairo_paint_with_alpha(cr, 0.5); }
> >
> >         tmp = tmp->next;
> >     }
> >     cairo_destroy(cr);
> >
> >
> >
> >
> > On Sun, Feb 17, 2013 at 4:59 AM, Daniel P. Berrange 
> > <d...@berrange.com>wrote:
> >
> >> On Sat, Feb 16, 2013 at 11:43:44AM -0600, Paul Archer wrote:
> >> > First, I want to say thanks, Daniel, for writing this, and for adding
> >> the
> >> > onion skin/overlay images option.
> >> >
> >> > Unfortunately, there seems to be a bug with the overlay. I don't know if
> >> > it's just with my particular setup, though. I've tried both compiling
> >> from
> >> > source, and getting the package from getdeb (now that it's back up).
> >> I'm on
> >> > Ubuntu 12.04 amd64, with a Canon 50D.
> >> > Anyway, the problem is that as soon as I go into live preview mode with
> >> the
> >> > overlay option on, the preview window shows the prior shots, with the
> >> live
> >> > view shrunk down to about 1/8 the window size and stuck in the upper
> >> left
> >> > corner.
> >>
> >> Doh, I know what is happening - the live view images are much smaller
> >> resolution than the actual captured images. We're drawing them at the
> >> same scaling factor, so the live view looks tiny by comparison. We need
> >> to apply different scaling factors to each image, so that they all end
> >> up rendered at the same size on screen.
> >>
> >> > Anyway, hope it's an easy fix. I'm not sure where to look in the code,
> >> but
> >> > if you point me in the right direction, I can at least give it a try.
> >>
> >> It'll be in src/frontend/entangle-image-display.c file in the method
> >> do_entangle_image_display_render_pixmap(). Not sure how easy it will
> >> be for you to fix though, because I fear there will be some performance
> >> issues with scaling during live view, due to the frequent refreshes.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
Entangle-devel mailing list
Entangle-devel@gna.org
https://mail.gna.org/listinfo/entangle-devel

Reply via email to