diff --git a/core/image.cpp b/core/image.cpp index 72d0d3e5547..ad52447935a 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1712,7 +1712,7 @@ void Image::unlock() { write_lock = PoolVector::Write(); } -Color Image::get_pixel(int p_x, int p_y) { +Color Image::get_pixel(int p_x, int p_y) const { uint8_t *ptr = write_lock.ptr(); #ifdef DEBUG_ENABLED diff --git a/core/image.h b/core/image.h index 1bb81c939f3..838b37352db 100644 --- a/core/image.h +++ b/core/image.h @@ -310,7 +310,7 @@ public: DetectChannels get_detected_channels(); - Color get_pixel(int p_x, int p_y); + Color get_pixel(int p_x, int p_y) const; void put_pixel(int p_x, int p_y, const Color &p_color); void copy_internals_from(const Ref &p_image) {