Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › getpixel from mask

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11754

    Bas

    hi,

     

    is there a way to get a pixel from a bitmap mask 1-bpp?

     

    #11759

    Günther
    Felgo Team

    Hi Bas!

    I believe there’s no easy way to do this. You can try asking in the official Qt Forums, they might be able to help you.
    Just an idea: You could have a chance by using a Canvas to draw the image and access the pixel data.

    Best,
    Günther

    #11760

    Bas

    hi Günther,

     

    i wanted to show an png image on a background by using slow fade and add some particles for some magical effect.

    i ended up with the following solution: get the center of the content of the png and use a circular random spread.

                    angle=Math.random()*PI2;
                    item.x = parImg.x + parImg.px + ( Math.random() * parImg.pradiusX )*Math.cos(angle) - (item.width>>1);
                    item.y = parImg.y + parImg.py + ( Math.random() * parImg.pradiusY )*Math.sin(angle) - (item.height>>1);
    

     

    using the canvas could have been an option 🙂

     

    thanx!

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded