| |
---|
| | public void imageView_Action(ActionEvent ev) { |
---|
| | String path = (new File(arg1_srcFolder.getText(), arg2_baseTimeImg.getText())).getPath(); |
---|
| | |
---|
| | File timeFile = new File(path); |
---|
| | long lastModifyTime = timeFile.lastModified(); |
---|
| | arg3_basetiome.argField.setText(ImportPicture.dfjp.format(new Date(lastModifyTime))); |
---|
| | |
---|
| | if (exifBase.isSelected()) { |
---|
| | try { |
---|
| | ImageMetadata meta = Imaging.getMetadata(timeFile); |
---|
| | JpegImageMetadata jpegMetadata = (JpegImageMetadata)meta; |
---|
| | if (jpegMetadata != null) { |
---|
| | TiffImageMetadata exif = jpegMetadata.getExif(); |
---|
| | if (exif != null) { |
---|
| | String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0]; |
---|
| | lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime(); |
---|
| | long lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime(); |
---|
| | arg3_basetiome.argField.setText(ImportPicture.dfjp.format(new Date(lastModifyTime))); |
---|
| | } |
---|
| | else { |
---|
| | arg3_basetiome.argField.setText("exif == null"); |
---|
| | } |
---|
| | } |
---|
| | } |
---|
| | catch (Exception e) {} |
---|
| | } |
---|
| | else { |
---|
| | long lastModifyTime = timeFile.lastModified(); |
---|
| | arg3_basetiome.argField.setText(ImportPicture.dfjp.format(new Date(lastModifyTime))); |
---|
| | } |
---|
| | |
---|
| | int size_x = imageSPane.getWidth() - 8; |
---|
| | ImageIcon tmpIcon = new ImageIcon(path); |
---|
| |
---|
| | |