fmw42 wrote: ↑2019-05-22T09:09:59-07:00I have no idea what your java program is doing or even if it is correct code. But as it appears to be displaying wrong.
That PNG matches the PDF the JPEG came out of, which matches the published book from the same source. What you posted is what you get if you have CMYK image data and display it as if it were RGBA.
snibgo wrote: ↑2019-05-22T09:22:52-07:00Compared to CorrectColors.png, the colors in bfoz014_1.jpg are screwed up, beyond a simple profile mismatch.
They aren't screwed up; the JPEG images are CMYK. It says so right in the metadata of the image and I said this at the beginning. The images do not include a profile but adding one isn't going to fix them as I already knew. The goal was to convert these CMYK images to RGB and not just slap on a profile. My searches here in this forum and elsewhere suggested that IM could do so and that specifying the original and target profiles would make this conversion happen as part of the process.
Most JPEG readers just automatically assume RGB when they open a JPEG file. This is why pretty much nothing on Windows so far will display them correctly. Even Adobe's own Acrobat Pro won't load them correctly as images even though the PDF they came from was created with InDesign. The JPGs are fine(ish). They are just not in a useful format for non-print purposes.
snibgo wrote: ↑2019-05-22T09:22:52-07:00How was the jpg image made? From the png file?
The JPEG was extracted from a PDF file created by Adobe InDesign CC using
Apache PDFBox
snibgo wrote: ↑2019-05-22T09:22:52-07:00How do you know the png file is "correct?
Because I can compare it with the image in the source PDF and with that in the printed book.
As this is a copyrighted publication (though the company that produced it is gone) I won't share the whole thing. I'm not really comfortable with what I have shared but they did fail to fully deliver on their Kickstarter so oh well. Here is the page that the image came from. This page was extracted with Adobe Acrobat Pro 10 and if opened in any PDF reader I tried displays the page as it is seen in the printed book.
https://www.dropbox.com/s/ub0h8vbsikdlh ... 3.pdf?dl=0
snibgo wrote: ↑2019-05-22T09:22:52-07:00It might help if you show that Java program.
You can download the code and/or the program from GitHub:
TokenTool
Assuming you are on Windows, grab the .exe version as that bundles the required JVM within it. Once installed select File -> Open PDF from the menu and select the PDF above. It will open a window with two images: the background and the two figures. Select the image of the two figures and note how it is displayed. Drag the image from the PDF viewing window into the main TokenTool window. You'll see what it should look like. It's also possible to save the whole image out of TokenTool if desired.
The PNG file linked previously was from a screenshot of the bfoz014_1.jpg image dropped onto a map in
MapTool. Also available on GitHub.
Disclaimer: While a contributor to both projects, I am not the lead developer on either.