private static void demultiplyAlpha(int width, int height, byte[] data, int offset) {
		int srcPtr = offset;

		for (int i = 0; i < height; i++) {

			//skip rowFilter
			srcPtr++;
			for (int x = 0; x < 4 * width; x += 4) {
				if (data[srcPtr + (x + 3)] > 0) {
					data[srcPtr + x] =
						(byte) ((data[srcPtr + x] * 255 + (data[srcPtr + (x + 3)] >> 1)) / data[srcPtr +
							(x + 3)]);

					data[srcPtr + (x + 1)] =
						(byte) ((data[srcPtr + (x + 1)] * 255 + (data[srcPtr + (x + 3)] >> 1)) / data[srcPtr +
							(x + 3)]);

					data[srcPtr + (x + 2)] =
						(byte) ((data[srcPtr + (x + 2)] * 255 + (data[srcPtr + (x + 3)] >> 1)) / data[srcPtr +
							(x + 3)]);
				}
			}
			srcPtr += 4 * width;
		}

	}
Demultiplies the Alpha based on source code from http://www.jongware.com/pngdefry.html
@param width image width
@param height image height
@param data image data
@param offset offset into data
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/png/CrushedPNGUtil.java