BBC BASIC for Windows
Programming >> Graphics and Games >> Display part of BMP image? (*DISPLAY)
http://bb4w.conforums.com/index.cgi?board=graphics&action=display&num=1488962640

Display part of BMP image? (*DISPLAY)
Post by 5against4 on Mar 8th, 2017, 07:44am

While it's possible to display a BMP image with *DISPLAY, is it possible to display just part of an image, i.e. by specifying a pixel range?
Re: Display part of BMP image? (*DISPLAY)
Post by michael on Mar 8th, 2017, 2:08pm

Check in the TOOLs section.

RETROLIB 12 with BMP sketch tools (array version)

Its actually fairly quick.

bmptocode would actually be more particular to extraction of specific pixels, but I am still reworking it for BBC Basic.

Other than Sprites, I don't know of other methods of extraction and display tools that show partial images, other than the tools I am working on.

Re: Display part of BMP image? (*DISPLAY)
Post by DDRM on Mar 9th, 2017, 08:24am

I don't think it's possible to show (only) part of the source image using *DISPLAY (or (*MDiSPLAY), you could do it using the system calls BitBlt or StretchBlt. That would require loading your image into a separate device context, and then copying the section you need to the main display.

If you need help doing that, let me know, and I'll try to put together a bit of example code.

best wishes,

D