@@ -135,7 +135,7 @@ public void WorkingBufferSizeHintInBytes_IsAppliedCorrectly<TPixel>(
135135 destSize . Height ,
136136 image0 . Height ,
137137 Configuration . Default . MemoryAllocator ) ;
138- int minimumWorkerAllocationInBytes = verticalKernelMap . MaxDiameter * 2 * destSize . Width * SizeOfVector4 ;
138+ int minimumWorkerAllocationInBytes = verticalKernelMap . MaxDiameter * 2 * destSize . Width * SizeOfVector4 ;
139139 verticalKernelMap . Dispose ( ) ;
140140
141141 using ( Image < TPixel > image = image0 . Clone ( configuration ) )
@@ -419,9 +419,10 @@ public void ResizeWithBoxPadMode<TPixel>(TestImageProvider<TPixel> provider)
419419 using ( Image < TPixel > image = provider . GetImage ( ) )
420420 {
421421 var options = new ResizeOptions
422- {
423- Size = new Size ( image . Width + 200 , image . Height + 200 ) , Mode = ResizeMode . BoxPad
424- } ;
422+ {
423+ Size = new Size ( image . Width + 200 , image . Height + 200 ) ,
424+ Mode = ResizeMode . BoxPad
425+ } ;
425426
426427 image . Mutate ( x => x . Resize ( options ) ) ;
427428
@@ -462,6 +463,26 @@ public void ResizeWithCropWidthMode<TPixel>(TestImageProvider<TPixel> provider)
462463 }
463464 }
464465
466+ [ Theory ]
467+ [ WithFile ( TestImages . Jpeg . Issues . IncorrectResize1006 , DefaultPixelType ) ]
468+ public void CanResizeLargeImageWithCropMode < TPixel > ( TestImageProvider < TPixel > provider )
469+ where TPixel : struct , IPixel < TPixel >
470+ {
471+ using ( Image < TPixel > image = provider . GetImage ( ) )
472+ {
473+ var options = new ResizeOptions
474+ {
475+ Size = new Size ( 480 , 600 ) ,
476+ Mode = ResizeMode . Crop
477+ } ;
478+
479+ image . Mutate ( x => x . Resize ( options ) ) ;
480+
481+ image . DebugSave ( provider ) ;
482+ image . CompareToReferenceOutput ( ValidatorComparer , provider ) ;
483+ }
484+ }
485+
465486 [ Theory ]
466487 [ WithFileCollection ( nameof ( CommonTestImages ) , DefaultPixelType ) ]
467488 public void ResizeWithMaxMode < TPixel > ( TestImageProvider < TPixel > provider )
@@ -486,12 +507,12 @@ public void ResizeWithMinMode<TPixel>(TestImageProvider<TPixel> provider)
486507 using ( Image < TPixel > image = provider . GetImage ( ) )
487508 {
488509 var options = new ResizeOptions
489- {
490- Size = new Size (
510+ {
511+ Size = new Size (
491512 ( int ) Math . Round ( image . Width * .75F ) ,
492513 ( int ) Math . Round ( image . Height * .95F ) ) ,
493- Mode = ResizeMode . Min
494- } ;
514+ Mode = ResizeMode . Min
515+ } ;
495516
496517 image . Mutate ( x => x . Resize ( options ) ) ;
497518
@@ -508,9 +529,10 @@ public void ResizeWithPadMode<TPixel>(TestImageProvider<TPixel> provider)
508529 using ( Image < TPixel > image = provider . GetImage ( ) )
509530 {
510531 var options = new ResizeOptions
511- {
512- Size = new Size ( image . Width + 200 , image . Height ) , Mode = ResizeMode . Pad
513- } ;
532+ {
533+ Size = new Size ( image . Width + 200 , image . Height ) ,
534+ Mode = ResizeMode . Pad
535+ } ;
514536
515537 image . Mutate ( x => x . Resize ( options ) ) ;
516538
@@ -527,9 +549,10 @@ public void ResizeWithStretchMode<TPixel>(TestImageProvider<TPixel> provider)
527549 using ( Image < TPixel > image = provider . GetImage ( ) )
528550 {
529551 var options = new ResizeOptions
530- {
531- Size = new Size ( image . Width / 2 , image . Height ) , Mode = ResizeMode . Stretch
532- } ;
552+ {
553+ Size = new Size ( image . Width / 2 , image . Height ) ,
554+ Mode = ResizeMode . Stretch
555+ } ;
533556
534557 image . Mutate ( x => x . Resize ( options ) ) ;
535558
0 commit comments