gl: fix tracking of CPU memory size.
dicom: fix for JPEG 2000 vs. lossless.