problem in checking the dimensions of an image.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madhuriks
    New Member
    • Jun 2010
    • 149

    #1

    problem in checking the dimensions of an image.

    hi,
    im doing validations in java code for image upload..im unable to get validated i.e.,if two files are entered it should check for the dimensions.i m unable to code how to check for the dimensions...ca n anyone help me out...here is the code...
    Code:
     public boolean isValidImageContent(ImageContentArray imageContentArray, ContentResponse contentResponse) {
            boolean validContentB = true;
            validContentB = validateContentProperties(contentResponse);
            if (validContentB) {
                ArrayList<ImageContentData> imageContentDatas = imageContentArray.getImageContentDatas();
                if (imageContentDatas == null
                        || imageContentDatas.size() == 0) {
                    contentResponse.setResponseCode("1");
                    contentResponse.setRemarks("Image Content is Empty");
                } else {
                    for (ImageContentData imageContentData : imageContentDatas) {
                        if (imageContentData.getDimesions() == null) {
                            contentResponse.setRemarks("");
                        }
                    }
                }
            }
            return validContentB;
        }
    any reply....
    thanks,
    madhu.
    Last edited by Dormilich; Aug 30 '10, 06:34 AM. Reason: JavaScript != Java (thread moved)
Working...