Jelajahi Sumber

LibGfx/ExifOrientedBitmap: Use `scanline` instead of `set_pixel()`

The former has the advantage to be available in CMYKBitmap too.

No behavior change.
Lucas CHOLLET 1 tahun lalu
induk
melakukan
c80b2cf782

+ 1 - 1
Userland/Libraries/LibGfx/ImageFormats/ExifOrientedBitmap.h

@@ -23,7 +23,7 @@ public:
     void set_pixel(u32 x, u32 y, Color color)
     {
         auto const new_position = oriented_position(IntPoint(x, y));
-        m_bitmap->set_pixel(new_position, color);
+        m_bitmap->scanline(new_position.y())[new_position.x()] = color.value();
     }
 
     NonnullRefPtr<Bitmap>& bitmap()