On Monday, 3 August 2020 16:47:53 BST Ralph Corderoy wrote:
> I think your image will have to be 128×128 pixels.
> 
> Deleting the commented out or boring lines from the code you gave leaves
> 
> >    284  def OLED_ShowImage(self, Image, Xstart, Ystart):
> >    288      self.OLED_SetWindows ( Xstart, Ystart, self.OLED_Dis_Column ,
> >    self.OLED_Dis_Page) 289      Pixels = Image.load()
> >    290      for j in range(0, self.OLED_Dis_Page):
> >    291          for i in range(0, int(self.OLED_Dis_Column / 2)):
> >    294              Pixels_Color = ((Pixels[2*i, j] & 0xf) << 4) |
> >    (Pixels[2*i+1, j] & 0xf) 296             
> >    self.OLED_WriteData(Pixels_Color)
> 
> You could do with finding out if OLED_Dis_Column and OLED_Dis_Page are
> 128, and whether there's the option of altering it for your 95 rows
> instead.

So if I've understood what you are saying correctly, it's the for loop that's 
out of range and not the image (as such).  It simply keeps looping round until 
it gets to 128 and if there are no more pixels after 95 it barfs?

I'll look into that.  Thanks.

-- 



                Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-08-04 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to