croxis / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

PaintBuffer.GetString should allow for both mode and origin conversions at the same time #136

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The code:
https://code.google.com/p/cefpython/source/browse/cefpython/paint_buffer_cef3.py
x?r=938bc5f969bd#36

It should change to something like this:

  cdef void* temp_buffer
  if dest_alloced:
      temp_buffer = <void*>malloc(self.length)
      memcpy(temp_buffer, dest, self.length)
      FlipBufferUpsideDown(dest, temp_buffer, self.width, self.height)
      free(temp_buffer)
  else:
      dest = <void*>malloc(self.length)
      dest_alloced = True
      FlipBufferUpsideDown(dest, self.buffer, self.width, self.height)

Original issue reported on code.google.com by czarek.t...@gmail.com on 22 Aug 2014 at 6:19

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 22 Aug 2014 at 6:25