Git Product home page Git Product logo

Comments (7)

panzergame avatar panzergame commented on May 30, 2024

Does PIL support python3.5, and does it wrote in C python API ?

from upbge.

BluePrintRandom avatar BluePrintRandom commented on May 30, 2024

It looks like they are getting PIL ready for 3.5 (it may work now) but it's not listed in supported yet*
(when you look at the GIT for PILLOW) and it contains compiled binaries, so potentially it has a C api.

from upbge.

youle31 avatar youle31 commented on May 30, 2024

Hi, I just tested bge with pillow and it seems to work (not easy but it works): https://drive.google.com/file/d/0B3GouQIyoCmrYXRWbmMweW41dEk/view?usp=sharing (Pillow compiled for Windows 64 bits and python 3.5 64 bits (installed with pip install pillow...I had no problem)-- tested with last upbge sources)

  • I loaded an image with Pillow
  • converted it into pixels
  • bound it in a bgl.Buffer
  • I changed the source of the current texture to be the bgl.Buffer

That's not what you wanted to do?

from upbge.

BluePrintRandom avatar BluePrintRandom commented on May 30, 2024

Yes that is exactly what I wanted, but for some reason it kept spitting out
a size error.
On Feb 25, 2016 3:37 AM, "youle31" [email protected] wrote:

Hi, I just tested bge with pillow and it seems to work (not easy but it
works):
https://drive.google.com/file/d/0B3GouQIyoCmrYXRWbmMweW41dEk/view?usp=sharing
(Pillow compiled for Windows 64 bits and python 3.5 64 bits -- tested with
last upbge sources)

  • I loaded an image with Pillow
  • converted it into pixels
  • bound it in a bgl.Buffer
  • I changed the source of the current texture to be the bgl.Buffer

That's not what you wanted to do?


Reply to this email directly or view it on GitHub
#41 (comment).

from upbge.

youle31 avatar youle31 commented on May 30, 2024

Could you send the error log, please? Do you open the file with a 2.77 64 bits version on windows?
What if you replace imbuf = Buffer(GL_BYTE, [im.size[0] * im.size[1] * 3], data) with
imbuf = Buffer(GL_BYTE, len(data), data)?
It would be cool also if you send the prints of all values you can in the file

from upbge.

youle31 avatar youle31 commented on May 30, 2024

Seems to work for everyone, so I close the feature request.

from upbge.

BluePrintRandom avatar BluePrintRandom commented on May 30, 2024

Can we re open this

I can pass a PIL image into the buffer, but bgl.buffer is very very slow

it's passing a pointer, and then bge.buffer has to re-parse the data I think

so you don't pass a whole image at 1 shot.

from upbge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.