Image conversion
#8
(07-13-2020, 03:14 AM)danielt Wrote: I can see a couple of things here.

Firstly you are calling the private draw method _rle2bit() rather than the documented blit() method (see https://wasp-os.readthedocs.io/en/latest...ml#drawing ). Additionally you have supplied fg, c1 and c2 arguments instead of relying on their default values.

Secondly you are blitting a full screen image at (x,y) = (20, 20). This will drawing outside the bounds of the display and that provokes an exception.

Try something simpler such as:

Code:
draw.blit(self._logo, 0, 0)

One reason to prefer Draw565.blit() over Draw565._rle2bit() is that the code above should work, without modification for 1-bit images as well.


Thankyou so much. It worked !!..


Messages In This Thread
Image conversion - by pratyush049 - 07-01-2020, 04:54 AM
RE: Image conversion - by danielt - 07-01-2020, 07:34 AM
RE: Image conversion - by pratyush049 - 07-01-2020, 11:39 PM
RE: Image conversion - by pratyush049 - 07-08-2020, 12:03 AM
RE: Image conversion - by danielt - 07-08-2020, 03:00 AM
RE: Image conversion - by pratyush049 - 07-10-2020, 05:13 AM
RE: Image conversion - by danielt - 07-13-2020, 03:14 AM
RE: Image conversion - by pratyush049 - 07-13-2020, 05:16 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)