diff --git a/src/ImageProcessor/Formats/Png/PngDecoderCore.cs b/src/ImageProcessor/Formats/Png/PngDecoderCore.cs
index 919622e08..2ae91f258 100644
--- a/src/ImageProcessor/Formats/Png/PngDecoderCore.cs
+++ b/src/ImageProcessor/Formats/Png/PngDecoderCore.cs
@@ -24,7 +24,7 @@ namespace ImageProcessor.Formats
///
/// The maximum chunk size.
///
- private const int MaxChunkSize = 1024 * 1024;
+ private const int MaxChunkSize = int.MaxValue / 4 * sizeof(float);
///
/// The dictionary of available color types.