Set_texture problems on Android with different texture format

I create an RGBA atlas/texture with create_atlas/create_texture and
p = {width = 1024, height = 1024, type = graphics.TEXTURE_TYPE_2D,
format = graphics.TEXTURE_FORMAT_RGBA }

I load an JPG (RGB) from the web with image.load_buffer and try to use set_buffer with above created texture and p
p = { width = img.width, height = img.height, type = graphics.TEXTURE_TYPE_2D, format = graphics.TEXTURE_FORMAT_RGB, x=0, y=1024-img.height}

This works in the Editor and Windows, but crashes on Android with GL_INVALID_OPERATION. It seems that on Android the TEXTURE_FORMAT_RGB needs to be the same. Or do I miss something?

I think this is a problem of an old OpenGL version on my Android 9 tablet.
My workaround was to convert the JPG RGB buffer to an ARGB buffer, before using set_texure with the ARGB texture of the atlas. This works, but is very slow with Lua.

A better solution would be to offer an option “create_format_argb” for image.load_buffer, so a ARGB buffer gets created when loading a JPG.