fpic, maintain aspect ratio after "pict" message

Greg Cerveny's icon

I've got a simple patch that displays one of two pictures in an fpic object.

I've selected the keep aspect ratio and scale image attributes, but newly loaded pictures do not respect these settings.

Is there a way to have fpic either letterbox a dynamically loaded picture or resize the frame appropriately?

Sample patch:

Max Patch
Copy patch and select New From Clipboard in Max.

Rodrigo's icon

I've not checked your example (on a laptop without Max installed) but I had very similar issues and the most recent update fixed this issue for me.

Greg Cerveny's icon

Unfortunately I'm running into this on the latest, 7.2.4.

Source Audio's icon

You could try to append autofit 1 to pic message, like :
pic xxx.jpg, autofit 1

Greg Cerveny's icon

no dice on the auto fit either... :(

Screen-Shot-2016-08-04-at-3.12.21-PM.png
png
Source Audio's icon

I see, I misunderstood the problem.
Fpic can't auto adjust its rectangle to loaded picture
Autofit 1 message just scales loaded picture to the set rectangle, at least in max 6,
I am not using max 7.
So You have to edit the pictures to fit in the fpic rectangle, and leave autofit 0.
Otherwise, You get stretched or squeezed picts

metamax's icon

fpic seems to require manual adjustment to apply newly loaded pic dimensions to previously selected parameters. I can't imagine that not being a bug. Until it gets fixed, you can subtract the current pic position (use getattr) from the pic dimensions (use jit.matrixinfo) to reset the patching_rect attribute of [fpic]. A bit clunky but it it works.

Max Patch
Copy patch and select New From Clipboard in Max.