Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependency for gs back into imagemagick #211

Merged
merged 1 commit into from
Apr 22, 2022
Merged

Conversation

nigelgbanks
Copy link
Contributor

@nigelgbanks nigelgbanks commented Apr 21, 2022

To test see the difference between the alpha release and this build.

docker run --rm -ti -p 8000:8000 islandora/houdini:1.0.0-alpha-16 

In a separate shell:

curl -H "Authorization: Bearer islandora" -H "Apix-Ldp-Resource: http://www.africau.edu/images/default/sample.pdf"  "localhost:8000/identify"

Yields:

sh: gs: not found
convert: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dPrinted=false  '-sOutputFile=/tmp/magick-g6H-TpZRwSZ5ypJX0xXEFYostRKEkiOC%d' '-f/tmp/magick-fisBVcT5FE7CB0x6CG7yQ3_yEJaPdBne' '-f/tmp/magick-yDC4fwTfCG9NYYltgJWJyLGtWveGlIae'' (32512) @ error/ghostscript-private.h/ExecuteGhostscriptCommand/74.
convert: no images defined `json:-' @ error/convert.c/ConvertImageCommand/3322.

After the change is applied.

docker run --rm -ti -p 8000:8000 islandora/houdini:b93f134907ec28f89818af22dd53b9d0b1fb0be8 

In a separate shell:

curl -H "Authorization: Bearer islandora" -H "Apix-Ldp-Resource: http://www.africau.edu/images/default/sample.pdf"  "localhost:8000/identify"

Yields:

[{
  "version": "1.0",
  "image": {
    "name": "-",
    "format": "PDF",
    "formatDescription": "PDF",
    "mimeType": "application/pdf",
    "class": "DirectClass",
    "geometry": {
      "width": 612,
      "height": 792,
      "x": 0,
      "y": 0
    },
    "resolution": {
      "x": 72,
      "y": 72
    },
    "printSize": {
      "x": 8.5,
      "y": 11
    },
    "units": "Undefined",
    "type": "Bilevel",
    "baseType": "Undefined",
    "endianness": "Undefined",
    "colorspace": "sRGB",
    "depth": 8,
    "baseDepth": 16,
    "channelDepth": {
      "alpha": 8,
      "red": 1,
      "green": 1,
      "blue": 8
    },
    "pixels": 1938816,
    "imageStatistics": {
      "Overall": {
        "min": 0,
        "max": 65535,
        "mean": 48174.4,
        "median": 49151.2,
        "standardDeviation": 8938.84,
        "kurtosis": -0.86001,
        "skewness": -1.06514,
        "entropy": 0.135078
      }
    },
    "channelStatistics": {
      "alpha": {
        "min": 0,
        "max": 65535,
        "mean": 780.231,
        "median": 0,
        "standardDeviation": 5761.04,
        "kurtosis": 74.3115,
        "skewness": 8.37847,
        "entropy": 0.0527894
      },
      "red": {
        "min": 0,
        "max": 65535,
        "mean": 63972.4,
        "median": 65535,
        "standardDeviation": 9998.11,
        "kurtosis": 36.9646,
        "skewness": -6.24215,
        "entropy": 0.162508
      },
      "green": {
        "min": 0,
        "max": 65535,
        "mean": 63972.4,
        "median": 65535,
        "standardDeviation": 9998.11,
        "kurtosis": 36.9646,
        "skewness": -6.24215,
        "entropy": 0.162508
      },
      "blue": {
        "min": 0,
        "max": 65535,
        "mean": 63972.4,
        "median": 65535,
        "standardDeviation": 9998.11,
        "kurtosis": 36.9646,
        "skewness": -6.24215,
        "entropy": 0.162508
      }
    },
    "alpha": "#FFFFFFFFFFFF0000",
    "renderingIntent": "Perceptual",
    "gamma": 0.454545,
    "chromaticity": {
      "redPrimary": {
        "x": 0.64,
        "y": 0.33
      },
      "greenPrimary": {
        "x": 0.3,
        "y": 0.6
      },
      "bluePrimary": {
        "x": 0.15,
        "y": 0.06
      },
      "whitePrimary": {
        "x": 0.3127,
        "y": 0.329
      }
    },
    "matteColor": "#BDBDBD",
    "backgroundColor": "#FFFFFF",
    "borderColor": "#DFDFDF",
    "transparentColor": "#00000000",
    "interlace": "None",
    "intensity": "Undefined",
    "compose": "Over",
    "pageGeometry": {
      "width": 612,
      "height": 792,
      "x": 0,
      "y": 0
    },
    "dispose": "Undefined",
    "iterations": 0,
    "scene": 0,
    "scenes": 2,
    "compression": "Undefined",
    "orientation": "Undefined",
    "properties": {
      "date:create": "2022-04-21T17:04:45+00:00",
      "date:modify": "2022-04-21T17:04:45+00:00",
      "icc:copyright": "Copyright Artifex Software 2011",
      "icc:description": "Artifex Software sRGB ICC Profile",
      "pdf:HiResBoundingBox": "612x792+0+0",
      "pdf:Version": "PDF-1.3",
      "signature": "1e910ef3ff54e9dbb7ab6395c13ce49f1443038bc246fa813e91557ff0284172"
    },
    "profiles": {
      "icc": {
        "length": 2576
      }
    },
    "tainted": false,
    "filesize": "14569B",
    "numberPixels": "484704",
    "pixelsPerSecond": "19.955MB",
    "userTime": "0.020u",
    "elapsedTime": "0:01.024",
    "version": "ImageMagick 7.1.0-16 Q16-HDRI aarch64 2021-11-21 https://imagemagick.org"
  }
},
{
  "version": "1.0",
  "image": {
    "name": "-",
    "baseName": "-",
    "format": "PDF",
    "formatDescription": "PDF",
    "mimeType": "application/pdf",
    "class": "DirectClass",
    "geometry": {
      "width": 612,
      "height": 792,
      "x": 0,
      "y": 0
    },
    "resolution": {
      "x": 72,
      "y": 72
    },
    "printSize": {
      "x": 8.5,
      "y": 11
    },
    "units": "Undefined",
    "type": "Bilevel",
    "baseType": "Undefined",
    "endianness": "Undefined",
    "colorspace": "sRGB",
    "depth": 8,
    "baseDepth": 16,
    "channelDepth": {
      "alpha": 8,
      "red": 1,
      "green": 1,
      "blue": 8
    },
    "pixels": 1938816,
    "imageStatistics": {
      "Overall": {
        "min": 0,
        "max": 65535,
        "mean": 48483.4,
        "median": 49151.2,
        "standardDeviation": 7475.55,
        "kurtosis": -0.801746,
        "skewness": -1.09294,
        "entropy": 0.0999527
      }
    },
    "channelStatistics": {
      "alpha": {
        "min": 0,
        "max": 65535,
        "mean": 552.809,
        "median": 0,
        "standardDeviation": 4932,
        "kurtosis": 108.962,
        "skewness": 10.1288,
        "entropy": 0.037657
      },
      "red": {
        "min": 0,
        "max": 65535,
        "mean": 64460.2,
        "median": 65535,
        "standardDeviation": 8323.4,
        "kurtosis": 55.9932,
        "skewness": -7.61532,
        "entropy": 0.120718
      },
      "green": {
        "min": 0,
        "max": 65535,
        "mean": 64460.2,
        "median": 65535,
        "standardDeviation": 8323.4,
        "kurtosis": 55.9932,
        "skewness": -7.61532,
        "entropy": 0.120718
      },
      "blue": {
        "min": 0,
        "max": 65535,
        "mean": 64460.2,
        "median": 65535,
        "standardDeviation": 8323.4,
        "kurtosis": 55.9932,
        "skewness": -7.61532,
        "entropy": 0.120718
      }
    },
    "alpha": "#FFFFFFFFFFFF0000",
    "renderingIntent": "Perceptual",
    "gamma": 0.454545,
    "chromaticity": {
      "redPrimary": {
        "x": 0.64,
        "y": 0.33
      },
      "greenPrimary": {
        "x": 0.3,
        "y": 0.6
      },
      "bluePrimary": {
        "x": 0.15,
        "y": 0.06
      },
      "whitePrimary": {
        "x": 0.3127,
        "y": 0.329
      }
    },
    "matteColor": "#BDBDBD",
    "backgroundColor": "#FFFFFF",
    "borderColor": "#DFDFDF",
    "transparentColor": "#00000000",
    "interlace": "None",
    "intensity": "Undefined",
    "compose": "Over",
    "pageGeometry": {
      "width": 612,
      "height": 792,
      "x": 0,
      "y": 0
    },
    "dispose": "Undefined",
    "iterations": 0,
    "scene": 1,
    "scenes": 2,
    "compression": "Undefined",
    "orientation": "Undefined",
    "properties": {
      "date:create": "2022-04-21T17:04:45+00:00",
      "date:modify": "2022-04-21T17:04:45+00:00",
      "icc:copyright": "Copyright Artifex Software 2011",
      "icc:description": "Artifex Software sRGB ICC Profile",
      "pdf:HiResBoundingBox": "612x792+0+0",
      "pdf:Version": "PDF-1.3",
      "signature": "91873f9dd0654a4590dfacee308e2ff02a3a70959eca707067a860fe400b35a4"
    },
    "profiles": {
      "icc": {
        "length": 2576
      }
    },
    "tainted": false,
    "filesize": "13306B",
    "numberPixels": "484704",
    "pixelsPerSecond": "4.39825MB",
    "userTime": "0.110u",
    "elapsedTime": "0:01.110",
    "version": "ImageMagick 7.1.0-16 Q16-HDRI aarch64 2021-11-21 https://imagemagick.org"
  }
}]

Copy link
Contributor

@jefferya jefferya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nigelgbanks nigelgbanks merged commit 6420ab1 into main Apr 22, 2022
@nigelgbanks nigelgbanks deleted the issue-210-gs branch April 22, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants