Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when reference and target images are different dimensions #2

Open
leikahing opened this issue Mar 23, 2014 · 0 comments
Open
Labels

Comments

@leikahing
Copy link
Member

Issue by himekat from Friday Mar 14, 2014 at 18:18 GMT
Originally opened as https://github.com/mochify/renderly/issues/28


Description of Bug

If the target image is a different size (dimension-/pixel-wise) than the reference image, the app crashes with the one of the following exceptions (depending on the specific change):

Unhandled Exception: AForge.Imaging.InvalidImagePropertiesException: Template's size should be smaller or equal to source image's size.
   at AForge.Imaging.ExhaustiveTemplateMatching.ProcessImage(Bitmap image, Bitmap template, Rectangle searchZone)
   at Renderly.Imaging.ExhaustiveTemplateComparer.Matches(Bitmap reference, Bitmap compare) in f:\gitprojects\renderly\R
enderly\Imaging\ExhaustiveTemplateComparer.cs:line 32
   at Renderly.Controllers.RenderingController.RunTest(TestCase tc) in f:\gitprojects\renderly\Renderly\Controllers\Rend
eringController.cs:line 49
   at Renderly.Controllers.RenderingController.<RunTests>d__0.MoveNext() in f:\gitprojects\renderly\Renderly\Controllers
\RenderingController.cs:line 31
   at RenderlyApp.Commands.RunRenderingCommand.Run(String[] remainingArguments) in f:\gitprojects\renderly\RenderlyApp\C
ommands\RunRenderingCommand.cs:line 119
   at ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consol
eOut, Boolean skipExeInExpectedUsage) in c:\src\ManyConsole\ManyConsole\ConsoleCommandDispatcher.cs:line 81
   at RenderlyApp.Program.Main(String[] args) in f:\gitprojects\renderly\RenderlyApp\Program.cs:line 35
Unhandled Exception: AForge.Imaging.InvalidImagePropertiesException: Overlay image size must be equal to source image si
ze.
   at AForge.Imaging.Filters.BaseInPlaceFilter2.ProcessFilter(UnmanagedImage image)
   at AForge.Imaging.Filters.BaseInPlaceFilter.Apply(BitmapData imageData)
   at AForge.Imaging.Filters.BaseInPlaceFilter.Apply(Bitmap image)
   at Renderly.Imaging.ExhaustiveTemplateComparer.GenerateDifferenceMap(Bitmap reference, Bitmap compare) in f:\gitproje
cts\renderly\Renderly\Imaging\ExhaustiveTemplateComparer.cs:line 60
   at Renderly.Controllers.RenderingController.RunTest(TestCase tc) in f:\gitprojects\renderly\Renderly\Controllers\Rend
eringController.cs:line 60
   at Renderly.Controllers.RenderingController.<RunTests>d__0.MoveNext() in f:\gitprojects\renderly\Renderly\Controllers
\RenderingController.cs:line 31
   at RenderlyApp.Commands.RunRenderingCommand.Run(String[] remainingArguments) in f:\gitprojects\renderly\RenderlyApp\C
ommands\RunRenderingCommand.cs:line 119
   at ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consol
eOut, Boolean skipExeInExpectedUsage) in c:\src\ManyConsole\ManyConsole\ConsoleCommandDispatcher.cs:line 81
   at RenderlyApp.Program.Main(String[] args) in f:\gitprojects\renderly\RenderlyApp\Program.cs:line 35

Reproduction

  1. Begin with a test case that passes comparison.
  2. Modify the reference image to be slightly smaller than the target image.
  3. Run a comparison

    --It should fail with the above exception

Ideal Behavior

Ideally, the app won't crash, it will actually indicate the size difference in the report (by failing the test case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant