proportion issue while rendering to matrix


    Nov 14 2007 | 1:46 pm
    Hi there, i have issues keeping proportions of my image while changing dimensions when rendering to a matrix with the jit.gl.sketch/glread pixels method. could anybody tell me what i am missing in the following patch : thanks in advance

    • Nov 15 2007 | 3:49 pm
      anyone ? this is probably something stupid i am overseeing so some advice would be greatly appreciated :) best
      Quote: (karrrlo) wrote on Wed, 14 November 2007 14:46 ---------------------------------------------------- > Hi there, i have issues keeping proportions of my image while changing dimensions when rendering to a matrix with the jit.gl.sketch/glread pixels method. > could anybody tell me what i am missing in the following patch : > thanks in advance > > max v2; > #N vpatcher 147 407 1077 1046; > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P newex 56 206 265 196617 jit.gl.videoplane bob @scale 1.333 1. 1. @blend_enable 1; > #P newex 685 243 147 196617 jit.window bob @size 640 480; > #P newex 395 53 48 196617 loadbang; > #P toggle 356 53 15 0; > #P newex 356 74 29 196617 gate; > #P button 395 74 15 0; > #P newex 356 97 30 196617 t b b; > #P message 395 97 115 196617 reset , glreadpixels bibi; > #P newex 115 123 83 196617 jit.gl.render bob; > #P newex 38 79 66 196617 t b b b erase; > #P message 76 153 83 196617 read dishes.mov; > #P flonum 79 37 35 9 0.5 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; > #P toggle 38 37 15 0; > #P newex 38 58 57 196617 qmetro 33; > #P newex 56 185 144 196617 jit.qt.movie 320 240; > #P user jit.fpsgui 294 278 60 196617 3; > #P newex 685 189 66 196617 prepend size; > #P newex 569 165 40 196617 t l l l; > #P newex 617 189 64 196617 prepend dim; > #N vpatcher 40 104 640 504; > #P outlet 51 220 15 0; > #P window setfont "Sans Serif" 9.; > #P message 184 179 186 196617 srcdimstart 0 479 , srcdimend 319 0; > #P newex 184 159 62 196617 prepend set; > #P newex 51 132 27 196617 t l b; > #P message 68 155 65 196617 usesrcdim 1; > #P newex 50 50 69 196617 vexpr $i1 -1; > #P newex 51 70 40 196617 unpack; > #P newex 51 110 218 196617 sprintf srcdimstart 0 %ld \, srcdimend %ld 0; > #P inlet 50 30 15 0; > #P comment 380 169 100 196617 shouldnt this work ?; > #P connect 1 0 4 0; > #P connect 4 0 3 0; > #P connect 3 1 2 0; > #P connect 2 0 6 0; > #P connect 6 0 9 0; > #P connect 5 0 9 0; > #P connect 6 1 5 0; > #P connect 2 0 7 0; > #P connect 7 0 8 0; > #P fasten 3 0 2 1 56 98 264 98; > #P pop; > #P newobj 569 189 42 196617 p adapt; > #P user ubumenu 525 141 100 196617 0 1 1 0; > #X add 320 240; > #X add 640 480; > #X add 720 540; > #X add 1024 768; > #X prefix_set 0 0 0; > #P user jit.pwindow 355 277 322 242 0 0 0 0 0 0; > #P newex 356 244 303 196617 jit.matrix @usesrcdim 1 @srcdimstart 0 239 @srcdimend 319 0; > #P newex 376 141 146 196617 jit.gl.sketch bob @automatic 0; > #P newex 356 215 148 196617 jit.matrix bibi 4 char 320 240; > #P window linecount 4; > #P comment 628 131 100 196617 only 320 240 dim keeps the right proportions , what am i doing wrong; > #P connect 13 0 12 0; > #P connect 12 0 16 0; > #P fasten 16 1 11 0 61 131 61 131; > #P fasten 15 0 11 0 81 173 61 173; > #P connect 11 0 25 0; > #P connect 14 0 12 1; > #P connect 16 3 17 0; > #P connect 16 2 17 0; > #P fasten 3 0 10 0 361 265 299 265; > #P connect 22 0 21 0; > #P connect 21 0 19 0; > #P fasten 7 0 1 0 622 210 361 210; > #P connect 19 0 1 0; > #P connect 1 0 3 0; > #P fasten 6 0 3 0 574 237 361 237; > #P connect 3 0 4 0; > #P fasten 16 0 21 1 43 102 344 102 344 42 380 42; > #P connect 18 0 2 0; > #P connect 19 1 2 0; > #P connect 23 0 20 0; > #P connect 20 0 18 0; > #P connect 5 1 8 0; > #P connect 8 0 6 0; > #P fasten 8 1 7 0 589 185 622 185; > #P fasten 8 2 9 0 604 185 690 185; > #P connect 9 0 24 0; > #P pop; > ----------------------------------------------------
    • Nov 15 2007 | 4:15 pm
      in your adapt-subpatch, you fall into the age old "commas are only for messageboxes" trap.
      hth
      /*j
    • Nov 15 2007 | 4:35 pm
      using a message box:
    • Nov 15 2007 | 4:47 pm
      Thanks a lot Jash and Zach , it was definetly something stupid, ( couple neurones on vacation apparently ) sorry for the bandwith :) take care
      k