title: Small change in colors during JPEG compression
body: <p>It looks like default library under Ubuntu changes colors a bit during the compression. I tried to set quality and sampling but I see no improvements, anyone ever challenged similar issue?</p>
  
  <p>subsampling = 0 ,  quality = 100 </p>
  
  <pre><code>#CORRECT COLORS FROM NPARRAY
  cv2.imshow("Object cam:{}".format(self.camera_id), self.out)
  
  print(self.out.item(1,1,0)) # B 
  print(self.out.item(1,1,1)) # G
  print(self.out.item(1,1,2)) # R
  
  self.out=cv2.cvtColor(self.out,  cv2.COLOR_BGR2RGB)
  
  #from PIL import Image
  im = Image.fromarray(self.out)
  r, g, b = im.getpixel((1, 1))
  ## just printing pixel and they are matching  
  print(r, g, b) 
  ## WRONG COLORS
  im.save(self.out_ramdisk_img,format='JPEG', subsampling=0, quality=100)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/RyoC0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RyoC0.jpg" alt="enter image description here"></a></p>
  
  <p>JPEG image should have the same colors as in imshow, but it's a bit more purple.</p>