pub fn transform_image(data: &[u8], action: &Action) -> Result<Vec<u8>>
Apply a transformation action to raw image bytes.
Returns the transformed image bytes.