Use PixelFormat.getValueType() instead of .getBytesPerComponent() to identify value type.
Remove compiler warning.
Adapt to changes in Rendering/Texture.