ImageUtils
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using word.utils.ImageUtils (Showing top 3 results out of 315)

origin: leonardoanalista/java2word

@Override
public String getContent() {
  if (hasBeenCalledBefore) {
    return txt.toString();
  } else {
    hasBeenCalledBefore = true;
  }
  // Placeholders: internalFileName, fileName, binary, width and height
  String[] arr = path.split("/");
  String fileName = arr[arr.length - 1];
  String internalFileName = System.currentTimeMillis() + fileName;
  // String binary = ImageUtils.getImageHexaBase64(path);
  String imageformat = path.substring(path.lastIndexOf('.') + 1);
  String binary = ImageUtils.getImageHexaBase64(bufferedImage,
      imageformat);
  setUpSize();
  String res = img_template;
  res = res.replace("{fileName}", fileName);
  res = res.replace("{internalFileName}", internalFileName);
  res = res.replace("{binary}", binary);
  res = res.replace("{width}", width);
  res = res.replace("{height}", height);
  txt.append(res);
  return txt.toString();
}
origin: leonardoanalista/java2word

@Test
public void sanityTestLocal() throws IOException{
  ImageUtils imageUtils = new ImageUtils();
  assertNotNull(imageUtils);
  BufferedImage bufferedImage = ImageIO.read(new File(Utils.getAppRoot() + "/src/test/resources/dtpick.gif"));
  String hexa = ImageUtils.getImageHexaBase64(bufferedImage, "gif");
  assertEquals(1, TestUtils.regexCount(hexa, "R0lGODlhEAAQAPMAAKVNSkpNpUpNSqWmpdbT1v"));
}
origin: leonardoanalista/java2word

@Override
public String getContent() {
  if (hasBeenCalledBefore) {
    return txt.toString();
  } else {
    hasBeenCalledBefore = true;
  }
  // Placeholders: internalFileName, fileName, binary, width and height
  String[] arr = path.split("/");
  String fileName = arr[arr.length - 1];
  String internalFileName = System.currentTimeMillis() + fileName;
  // String binary = ImageUtils.getImageHexaBase64(path);
  String imageformat = path.substring(path.lastIndexOf('.') + 1);
  String binary = ImageUtils.getImageHexaBase64(bufferedImage,
      imageformat);
  setUpSize();
  String res = img_template;
  res = res.replace("{fileName}", fileName);
  res = res.replace("{internalFileName}", internalFileName);
  res = res.replace("{binary}", binary);
  res = res.replace("{width}", width);
  res = res.replace("{height}", height);
  txt.append(res);
  return txt.toString();
}
word.utilsImageUtils

Most used methods

  • getImageHexaBase64
  • <init>

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Permission (java.security)
    Legacy security code; do not use.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JComboBox (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)