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

java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0 #28

Closed
GoogleCodeExporter opened this issue Mar 11, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Simply run Test2.java on the javacv home page.

I am expecting a frame with a webcam(attached to my PC) image generated.
It returns an error below : 
--------------------------------------------------------------------------
Exception in thread "main" java.lang.IllegalArgumentException: Width (0) and 
height (0) cannot be <= 0
    at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)
    at sun.awt.image.SunVolatileImage.getBackupImage(SunVolatileImage.java:207)
    at sun.awt.image.VolatileSurfaceManager.getBackupSurface(VolatileSurfaceManager.java:235)
    at sun.awt.image.VolatileSurfaceManager.initialize(VolatileSurfaceManager.java:91)
    at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:58)
    at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:67)
    at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:78)
    at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:72)
    at sun.awt.windows.WComponentPeer.createVolatileImage(WComponentPeer.java:501)
    at java.awt.Component.createVolatileImage(Component.java:3021)
    at java.awt.Component$BltBufferStrategy.createBackBuffers(Component.java:3558)
    at java.awt.Component$BltBufferStrategy.<init>(Component.java:3544)
    at java.awt.Component.createBufferStrategy(Component.java:3264)
    at java.awt.Canvas.createBufferStrategy(Canvas.java:166)
    at java.awt.Component.createBufferStrategy(Component.java:3204)
    at java.awt.Canvas.createBufferStrategy(Canvas.java:141)
    at name.audet.samuel.javacv.CanvasFrame.init(CanvasFrame.java:173)
    at name.audet.samuel.javacv.CanvasFrame.<init>(CanvasFrame.java:111)
    at name.audet.samuel.javacv.CanvasFrame.<init>(CanvasFrame.java:107)
    at Test2.main(Test2.java:16)
--------------------------------------------------------------------------


Using latest javacv.jar & jna.jar on windows xp. Using eclipse.

I am using JDK 1.5 update 21

Original issue reported on code.google.com by abhiroop...@gmail.com on 12 Oct 2010 at 6:24

@GoogleCodeExporter
Copy link
Author

This only means that OpenCV does not support your camera. You will have to try 
other things like different versions of OpenCV, FFmpeg, etc. This is not a 
problem with JavaCV.

Original comment by samuel.a...@gmail.com on 13 Oct 2010 at 12:45

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Ok. Thanks for the reply. Will try other versions.

Original comment by abhiroop...@gmail.com on 13 Oct 2010 at 1:58

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

No branches or pull requests

1 participant