ImageMagick failes to read a JPEG image - imagemagick

I've been using ImageMagick 6.9.0 for some time, and had setup some Railo scripts using it on a Windows Server 2008 R2 Standard Edition machine a while back. I know that they worked at the time. I just tried to run them on a new set of images now, but ImageMagick is failing on the very first command:
<cfexecute name="#Application.ImageMagickRoot#\identify.exe" variable="imgResult" timeout="60" arguments="-format ""%w|%h"" ""#attributes.infoFullPath#""" />
The error returned is:
identify.exe: RegistryKeyLookupFailed `CoderModulesPath' # error/module.c/GetMagickModulePath/662. identify.exe: no decode delegate for this image format `JPEG' # error/constitute.c/ReadImage/501.
I've never seen anything like this. So I checked and saw that there is a new version out, and downloaded IM 7.0.1. I tried running the above command again with no changes, but this time pointing to the 7.0.1 install folder. This resulted in a different, but similar, error:
identify.exe: unable to load module 'C:\ImageMagick-7.0.1-Q16\modules\coders\IM_MOD_RL_JPEG_.dll': The specified module could not be found. # error/module.c/OpenModule/1275. identify.exe: no decode delegate for this image format `JPEG' # error/constitute.c/ReadImage/505.
I looked in the directory in the error and there is a file named IM_MOD_RL_jpeg_.dll there.
The images that I'm trying to work with are all different, and I've cycled through 50 or so during testing. But all are between 4 and 10 megapixel photos exported from Photoshop CS5 Camera Raw to jpeg format. I've tried fiddling with the case of the drive letter and the file extension without success. A sample path to one of the images is:
c:\galleries_incoming\50\69\01 - Getting Ready\DSC_0001.JPG
I'm unsure what to try next. I tried running this command per an old message on the IM forum to get a list of my decode delegates:
convert -list configure
But IM tells me that configure is not a valid list option. In any case, it sounds like installing new decode delegates is something that requires a recompile, and I've just been relying on precompiled binaries (which I would assume would at least be able to read a jpeg).

Related

Render PDF Error in Quarto - dvipdfmx:fatal: Unable to open

I am using Quarto and trying to create a PDF. When I render the PDF for the first time everything is fine. However, when I made a change and tried to render the PDF a second time I got the following error:
restricted \write18 enabled.
entering extended mode
dvipdfmx:fatal: Unable to open "AWS_Architecture.pdf".
No output PDF file written.
compilation failed- error
I have found that if I rename the .qmd file that fixes it, but that is not ideal (e.g. AWS_Architecture.qmd --> AWS_Architecture2.qmd). Even when I delete all of the files in the folder and start over using the same original name "AWS_Architecture.qmd", I still get the error and the PDF does not create.
Looking into the logs I found this.
LaTeX Warning: Label(s) may have changed. Rerun to get
cross-references right.
Error 1 (driver return code) generating output; file
AWS_Architecture.pdf may not be valid.
Below is the basic code for reference, nothing special.
---
title: "AWS Architecture"
format: pdf
---
## AWS Architecture
![](images/AWSArchitecture.png)
I believe that the error was arising because I was working out of Google Drive for desktop folder. This error does not occur when the working directory is set to a local folder on the PC.

strange corruption in rawpy.imread

I intended to read a DNG formatted image with the code rawpy.imread(path), however it returned me with a error message, saying unknown file: data corrupted at xxxxxxx (7-digit number).
Following this error, I found the program is still able to continue to run anyway, and the DNG image is not a flat one, since when visiting its property of raw_image_visible, it returned me with a ndarray of four channels. I have the lastest version of rawpy package (0.16.0) under Windows 10 environment.
I shared the photo via Google Drive. I have no idea how I can address this issue. Any kind of help is appreciated.

Creating macro to take and save screenshot and paste saved location into clipboard

I'm trying to follow this guide and countered a problem with step 4. This step essentially binds a keyboard shortcut to a bash script that uses scrot and xclip to save a screenshot and pastes the saved location to clipboard.
If I were using a Linux operating system I could follow this instruction, but currently I am using a Docker Ubuntu Container hosted on Windows 10. If I try to use xclip or scrot I get the following errors respectively.
xclip error:
Error: Can't open display: (null)
scrot error:
Can't open X display. It *is* running, yeah?
To work around this I've thought about replicating step 4 on my host machine with a combination of snip & sketch, clip, and binding a window shortcut to a batch file. There are many issues with this, the main issue being the fact that snip & sketch doesn't automatically save your screenshots, so I'd have to manually save after each screenshot.
My goal is to save a screenshot to a specified location and paste the saved location into my clipboard. Emphasis on image location because I am aware that snip & sketch copies the screenshot onto your clipboard; this is a problem I can't paste an image into vim.
To perform these series of commands on Docker or my host machine is fine.

Access exif data from gimpfu plugin

I am trying to access an images exif data from inside a gimpfu plugin, specifically the date a photo was taken, I can do this with PIL,
from PIL import Image
date_taken = Image.open(file)._getexif()[36867]
But when I try to import PIL, the plugin no longer appears inside the gimp menu. No error is being produced, and GIMP starts normally.
Is there a way to get the exif data with gimpfu? Or is there a way to import PIL into the plugin?
If the plugin no longer appears in the Gimp menu, it is likely because there is some problem in it that prevents it from running to the end to register. It can be a syntax error or, in this case, a problem importing PIL. If you are on Linux or OSX this is easy to debug, just start Gimp in a terminal session, error messages from the python interpreter will be displayed there. On Windows you can start Gimp with a --verbose parameter to make it run with an additional console windows for messages, but I'm not sure the Python errors show up there. If they don't, bracket you whole code in a try/except and dump the Exception error to a file. You can use the traceback module to get more info (line number of error, etc) but it could itself be the cause of other import errors...
To answer your initial problem, you can get the EXIF data from Gimp, using:
exifData=image.parasite_find('exif-data').data
However, this is just an array of bytes, and you have to do the parsing yourself (but I'll sure you'll find python code snippets to extract the data you want).

Cross platform way to get icon of firefox exe

I'm trying to get the path to the default firefox executable cross platform.
I tried the way recommended here:
https://stackoverflow.com/a/24056586/1828637
However its not working on mac os or linux
on mac it shows this: http://i.imgur.com/xu5GrF8.png
on linux (tested on ubuntu 14) it shows this: http://i.imgur.com/QxWKxbH.png
I was hoping to get the .xpm on linux and the .icns on mac os and the .ico on windows which is the container file, meaning like not just .ico of the single 64x64 image but contain all files please.
Thanks
Your title and question ask two different things, which is a bit confusing. I am not clear on if you want just a way to find the Firefox executable, or a way to extract the currently used (or default?) icon from Firefox.
Icon files:
If you are just looking for a URL to use within Firefox, they should be located at:
chrome://branding/content/icon128.png
chrome://branding/content/icon64.png
chrome://branding/content/icon32.png
chrome://branding/content/icon16.png
They do not appear to exist in .ico files within the Firefox distribution. In fact there are only 4 .ico files in the entire distribution. They are all within the browser/omni.ja file at (windows assumed as primary based on your statements in prior questions):
chrome\browser\skin\classic\browser\customizableui\customizeFavicon.ico
chrome\browser\skin\classic\aero\browser\customizableui\customizeFavicon.ico
chrome\browser\skin\classic\browser\preferences\in-content\favicon.ico
chrome\browser\skin\classic\aero\browser\preferences\in-content\favicon.ico
omni.ja files are just zip format files with the extension changed to .ja instead of .zip. You can change the file extension back to .zip and read it with any appropriate archive handler.
The chrome:// URLs are:
chrome://skin/customizableui/customizeFavicon.ico
chrome://skin/preferences/favicon.ico
I think you can only get access to two of them at a time through chrome://skin/ depending on if you are using aero. If you really need access to both you could use nsiZipReader to open the actual omni.ja file.
Executable file:
You already had a batter way to get the executable file. From your comment it is:
FileUtils.getFile('XREExeF', []);

Resources