1 Reply Latest reply on Jun 6, 2008 10:09 AM by Lukasz

    uploadFile and image size

    Lukasz Newbie


      I'm using uploadFile to upload some image, I want to limit image size to some size in pixels (100x100px), is there any way to do that? On server or on client side?

        • 1. Re: uploadFile and image size
          Lukasz Newbie

          solved (but maybe someone knows better solution?)

          public void listener(UploadEvent event) throws IOException {
          UploadItem item = event.getUploadItem();
          logo = item.getData();
          Image img = new ImageIcon(logo).getImage();
          log.debug("width: " + img.getWidth(null));
          log.debug("height: " + img.getHeight(null));