[PLUGIN] Paster

  • This is a great plugin!

    I am using Paster.imageUrl with invoke download .... can the output be changed to a jpeg file instead of a png file?

    Thanks

  • Is there a documentation (or wikipedia) about what a quad is and what is the purpose of that? Is used for a some sort of distortion matrix? I am interesting if it can help creating a image skew for a perspective 3d environment.

    Sorry for my ignorance.

  • Savvy001

    It's an issue with this plugin. Speciffically it has to do with pasting stuff that has effects. C2's runtime has had updates with it's webgl renderer and I haven't kept up since my pc doesn't use webgl currently.

    crugh

    It only does png currently, but here's how to change it to do jpeg instead if you wish.

    Open paster's runtime.js, then find

    canvas.toDataURL()[/code:3o99y0qo]
    and replace it with:
    [code:3o99y0qo]canvas.toDataURL("image/jpeg", 1.0)[/code:3o99y0qo]
    Where the "1.0" is the quality from 0.0 to 1.0.
    
    

    Cipriux[/p] "quad" is just short for quadrilateral. All the "draw quad" action does is let you specify the coordinates of the four corners of a quad to draw. It indeed lets you draw a image in a distorted way, but a perspective transformation isn't one of them. Look at previous pages in this topic for examples.

  • Ok thanks for the explanation

  • Savvy001

    It's an issue with this plugin. Speciffically it has to do with pasting stuff that has effects. C2's runtime has had updates with it's webgl renderer and I haven't kept up since my pc doesn't use webgl currently.

    Im having that same issue, and I don't mind downgrading...wich older C2 version would you recommend in order to use paster with webgl effects?

    Thank you!

  • Momio

    I'm not sure, you'd have to test previous versions to see when it stopped working.

  • Thanks for your answer!

  • Hi, is there a way to multithread or asynchronously retrieve the imageurl? Encoding a 2048x2048 image takes some time, 3-5 seconds of freezing to be exact. I would not mind getting the base64 string "later".

    Thanks,

    The Colonel

  • R0J0hound

    or anyone else that might help...

    By using selection box i am making selected area on picture/image and i am trying to copy that selected area with "paster" into jpeg of its own... i want to create new image out of that selected area.

    But i just cant get it... help!?

    i get image from canvas... but how can i save ti on my PC?

  • Is there anyway I can save the paster object unto an image? My idea is to use this with the Q3d plug in to draw on 3d objects. But I would need to be able to edit a texture to do so. Or so I think.

    q3d lets you re-texture an object with a preloaded image. My hope is that I can edit an image with paster and then load it in q3d

  • irina

    I'd just paste that paster onto a smaller paster object in the area you want to save and then use the .imageUrl of that to save with the browser object. Keep in mind it only saves as png, not jpg.

    sir LoLz

    You could use Paster.ImageUrl to access the image so you could load it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Awesome! that worked like a charm! Thanks!

  • R0J0hound

    Is there a way to use paster to create a fading trail behind objects preserving transparent background?

  • R0J0hound Any ETA on the Particles not drawing off-screen fix?

    I really wanted to use Paster for Splitscreen, but Particles aren't being drawn as soon as I go "off screen". Could you let me know of any good alternative workarounds?

    Thanks in advance. Great plugin btw.

  • Savvy001

    You should be able to do it by pasting the Sprite into the canvas then pasting a another sold Sprite that covers the paster object. The second object should have the destination out blend and just change the opacity to lower than 100. You'll also want to make the second object invisible when not pasting.

    The only caveat is it never fades all the way to transparent, although it gets close.

    Badmiracle

    No eta for a fix. I haven't touch the plug in a while.

    The particles off screen aren't drawn so the only workaround I can think of is to move both the particles and paster object on screen before pasting.

    Here's the offset.

    Offsetx = particles.x-scrollx

    Offsety = particles.y-scrolly

    Subtract it from the partircle and paster positions,

    Paste the particles,

    Then add the offset again.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)