X Position of Images in Carousel in Iterator with Quartz Composer

Bodysoulspirit's picture

Hey guys, posting here a same question I posted on Stack Overflow, let's see where I get more luck.

I've never been really good with iterators.

I just want to make a carousel slide with Quartz.

The Images have the same height, but different widths. I just wan't the images to be near one other …

It scans a directory, and iterates on a billboard, but the X positions of the images are crappy shit …

If anyone could help !

Posting the .qtz


Scroller.qtz32.5 KB
Scroller.png229.5 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Achim Breidenbach's picture
Re: X Position of Images in Carousel in Iterator with Quartz ...

My 2 cents:

  • Don't put the Directory scanner inside the Iterator, this patch may create a lot of overhead
  • Your x position is only based on the current image loaded within the Iterator, and not on all previous ones, so this won't work out
  • You don't need to really resize the image (which may be GPU expensive), just calculate a new image hight/width and use those Values in the Billboard patch

However, I would do a "scrolling" of images in a different way:

  • Just load a single image from your list
  • move this in from the right side of screen
  • once the image if fully visible, just render this complete screen into a new image (like a screen capture) using an "Accumulator" patch
  • load the next image and push it in again from the right side, while displaying the accumulator image also moving to the left
  • when the new image was shifted in completely then render this new situation in an image (accumulator image + new image) and feed this back into the accumulator for storage
  • now load the 3rd image and move it again with the accumulator from right to left.

No Iterator needed...

Hope this makes sense.


Bodysoulspirit's picture
Re: X Position of Images in Carousel in Iterator with Quartz ...

Hi Achim,

Thanks for the help

  • Took the Directory Scanner out the Iterator

  • Yeah I know it's only based on the current image, and that's where I'm stuck. Trying a lot, but all goes wrong, because all images have difference widths I can calculate the X position of the last image and Quartz places intermediate images equally within this width, but the images are not equally wide (In my real folder, too the desktop pictures folder so that everybody downloading it would have images loaded)

  • Yeah but if I don't resize the images, how will I be able to use the Width to calculate the X positions of the next images ?

Never worked with accumulators … Will give that a try …

Ah you are from Boinx ?!? :) I remember using that years ago when Fotomagico still was called PhotoPresenter for mac :) You made amazing .qtz back then :)

Thanks a lot

Achim Breidenbach's picture
Re: X Position of Images in Carousel in Iterator with Quartz ...

The "Rendering Destination Dimensions" patch gives you some useful values about your render environment. Here you can get the screens "Height" value ("Width should always be "2"). based on this"Height" your can calculate the new width for your image to get the same hight for all your images.

Speaking of "PhotoPresenter": You can have a look inside the "Stack" composition, here this Accumulator-Technique was used. The images in the background are no longer known to QC, but only as a single background image.