Ignore:
Timestamp:
07/31/19 15:51:04 (5 years ago)
Author:
bln4
Message:

Implemented surrogates for images. When you add an encryption label to a picture, the default is a on-the-fly generated image of noise. This generated image has the same size specifications as the primary image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Item.java

    r1422 r1426  
    40524052                if (copy.isAnnotation()) {
    40534053                        if (ItemUtils.startsWithTag(copy, ItemUtils.TAG_IMAGE, true)) {
    4054                                 copy.setText(ItemUtils.GetTag(ItemUtils.TAG_IMAGE) + ": redacted.png");
     4054                                String text = copy.getText();
     4055                                String size = "";
     4056                               
     4057                                // remove @i tag
     4058                                text = text.replaceFirst("@i:", "");
     4059                                text = text.replaceAll("\n", "");
     4060                                text = text.trim();
     4061
     4062                                int dotPos = text.indexOf('.');
     4063                                if (dotPos >= 0) {
     4064                                        int endOfFileNamePos = text.indexOf(' ', dotPos);
     4065                                        if (endOfFileNamePos >= 0) {
     4066                                                size = text.substring(endOfFileNamePos).trim();
     4067                                        }
     4068                                }
     4069                               
     4070                                String copyText = ItemUtils.GetTag(ItemUtils.TAG_IMAGE) + ": " + Picture.REDACTED_IMAGE_NAME + " " + size;
     4071                                copy.setText(copyText.trim());
    40554072                                copy.setVisible(true);
    40564073                        }
Note: See TracChangeset for help on using the changeset viewer.