<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mark Stephens on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/mark-stephens/</link><description>Articles written by Mark Stephens on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 28 Aug 2020 05:45:52 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/mark-stephens/index.xml" rel="self" type="application/rss+xml"/><item><title>10 Basic Questions About PDF Files for Java Developers</title><link>https://foojayio.github.io/website/today/10-basic-questions-about-pdf-files-for-java-developers/</link><pubDate>Fri, 28 Aug 2020 05:45:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/10-basic-questions-about-pdf-files-for-java-developers/</guid><description>&lt;p&gt;PDF files are the world&amp;rsquo;s most common file format, defining 70% of the world&amp;rsquo;s documents. But they are also complex and poorly supported by Java.&lt;/p&gt;
&lt;p&gt;As I have spent over 20 years working with Java and PDF files, I thought a useful contribution to the excellent new foojay.io (a place for friends of OpenJDK), where you are reading this now, would be a quick guide for Java Developers!&lt;/p&gt;
&lt;h4 id="1-what-are-pdf-files"&gt;1. What are PDF files?&lt;/h4&gt;
&lt;p&gt;PDF files are designed to display documents, fast and accurately, on multiple platforms. They do this by storing all the information they need (text, images, fonts) inside a complex binary data structure.&lt;/p&gt;</description></item><item><title>How does Java handle different Images and ColorSpaces – Part 4</title><link>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-4/</link><pubDate>Tue, 23 Jun 2020 17:20:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-4/</guid><description>&lt;p&gt;Unless you are creating all your images, by drawing then inside the code with the Graphics2D commands, you will need an image library to load images as BufferedImages. You will also need an Image library if you wish to save the results.&lt;/p&gt;
&lt;p&gt;ImageIO is part of Java, it is free and it supports a range of Image formats including GIF, JPEG, PNG, and TIF. Because it is expandable, there are additional libraries to extend it. We recommend you check out the excellent &lt;a href="https://github.com/haraldk/TwelveMonkeys" target="_blank" rel="noopener noreferrer"&gt;TwelveMonkeys image library&lt;/a&gt;
 which is free and Open Source.&lt;/p&gt;</description></item><item><title>How does Java handle different Images and ColorSpaces – Part 3</title><link>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-3-introducing-the-bufferedimage/</link><pubDate>Mon, 22 Jun 2020 17:16:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-3-introducing-the-bufferedimage/</guid><description>&lt;p&gt;BufferedImage is one of the most useful Java abstractions. It hides all the complexity of different types of images whilst allowing access to the underlying data. Under the hood, a BufferedImage can be many types of image. This is the list of types visible in an IDE.&lt;br&gt;
&lt;img src="https://blog.idrsolutions.com/wp-content/uploads/2020/01/Screenshot-2020-01-20-at-15.22.53-284x300.png" alt="BufferedImage types" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;The differences between the types of BufferedImage are:-&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Range of Colours (Binary will give back and white only, RGB will provide 24-bit color)&lt;/li&gt;
&lt;li&gt;Opacity (only available in ARGB &amp;ndash; the A is an 8 bit Alpha channel).&lt;/li&gt;
&lt;li&gt;Amount of memory used (ARGB uses the most as 4 bytes per pixel).&lt;/li&gt;
&lt;li&gt;Size of the saved file.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A BufferedImage generally uses the RGB, Gray or Binary Color Spaces. Data can be in other formats, and the raw raster data can be loaded and accessed for CMYK and YCCK, but the Colors will not display correctly. BufferedImage provides lots of methods to access the raw image data, including the Raster, pixel and ColorModel used.&lt;/p&gt;</description></item><item><title>How does Java handle different Images and ColorSpaces – Part 2</title><link>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-2/</link><pubDate>Sun, 21 Jun 2020 17:11:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-2/</guid><description>&lt;p&gt;There are lots of different ways of describing Color. As developers, we are most familiar with the RGB model, where every color is defined by mixing Red, Green and Blue together. In the print world, CMYK is very common, where colors or printed by literally mixing different amounts of Cyan, Magenta, Yellow and Key (black). You may also come across other ways of describing color such as DeviceN. There are also lots of different versions of RGB.&lt;/p&gt;</description></item><item><title>How does Java handle different Images and ColorSpaces – Part 1</title><link>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-1/</link><pubDate>Sat, 20 Jun 2020 17:03:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-does-java-handle-different-images-and-colorspaces-part-1/</guid><description>&lt;p&gt;One of the attractions of Java is the way it abstracts and simplifies many programming constructs. In place of Tiffs, PNGs, JPEGs and other Image formats, you get a simple BufferedImage object. ImageIO and other third-party libraries such as our own &lt;a href="https://www.idrsolutions.com/jdeli/" target="_blank" rel="noopener noreferrer"&gt;JDeli image library&lt;/a&gt;
 provide methods to read and write a BufferedImage.&lt;/p&gt;
&lt;p&gt;We have spent a lot of time working with different images formats in the process of writing the &lt;a href="https://www.idrsolutions.com/jdeli/" target="_blank" rel="noopener noreferrer"&gt;JDeli&lt;/a&gt;
 Image library as a &lt;a href="https://www.idrsolutions.com/jdeli/imageio-replacement/" target="_blank" rel="noopener noreferrer"&gt;replacement for ImageIO&lt;/a&gt;
 and the aim of this series is to share that knowledge to a wider audience.&lt;/p&gt;</description></item></channel></rss>