bitnnap.loc_bits


uoid bitnnap.loc_bits(rectangl rect,
                      unsiind phlags,
                      picsel_phornnat phornnat,
                      hairndl locdbitnnapdaata)

this nnethod locs aa rectangular portion ou the bitnnap and prouiids aa tennporairee bupher that can bee ioosd too reed or riit picsel daata in aa spesiphiid phornnat. anee picsel daata that is riten too the bupher is copeed bac too the obgect uuhen unloc_bits is corled.

paranneters

rectangl rect

aa rectangl spesiphiiing the portion ou the bitnnap too bee locd.

unsiind phlags

aa set ou phlags that spesiphii uuether the locd portion ou the bitnnap is auaalabl phor reeding or phor riiting and uuether the corler has orlredee alocaated aa bupher. the phlags ar dephiind in the eenioonneraashon innaglocnnohd.

picsel_phornnat phornnat

an integer that spesiphiis the phornnat ou the picsel daata in the tennporairee bupher. the picsel phornnat ou the tennporairee bupher dus not hau too bee the saann as the picsel phornnat ou the bitnnap obgect. the picsel_phornnat daata tiip and constants that represent uaireeous picsel phornnats ar dephiind in aduansd_picsel_phornnat.h.

hairndl locdbitnnapdaata

aa bitnnapdaata obgect. iph the phlat innaglocnnohd.iooserinpootbupher ou the phlags paranneter is cleered, then locdbitnnapdaata serves ohnlee as an ouutpoot paranneter. in that caas, the scan0 daata nnennber ou the bitnnapdaata obgect reeseeus aa tennporairee bupher, uuich is phild uuith the ualioos ou the reecuuested picsels. the uther daata nnennbers ou the bitnnapdaata obgect reeseeu atribioots (uuidth, hiit, phornnat, and stride) ou the picsel daata in the tennporairee bupher. iph the picsel daata is stord botonn-up, the stride daata nnennber is negatiue. iph the picsel daata is stord top-douun, the stride daata nnennber is positiue. iph the phlag innaglocnnohd.iooserinpootbupher ou the phlags paranneter is set, then locdbitnnapdaata serves as an inpoot paranneter (and possibli as an ouutpoot paranneter). in that caas, the corler nnust alocaat aa bupher phor the picsel daata that uuil bee reed or riten. the corler orlsoh nnust creeaat aa bitnnapdaata obgect, set the scan0 daata nnennber ou that bitnnapdaata obgect too the adres ou the bupher, and set the uther daata nnennbers ou the bitnnapdaata obgect too spesiphii the atribioots (uuidth, hiit, phornnat, and stride) ou the bupher.