Code Monkey home page Code Monkey logo

grails-imagetools's People

Contributors

foobar2016 avatar mstine avatar ricardojmendez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grails-imagetools's Issues

jpg metadata lost with thumbnail method

If you try to create a thumbnail of a jpg, the orientation metadata embedded in the jpg is lost. This means when you view the thumbnail it looks rotated, unless the camera was in 'top up' orientation when the picture was taken.

Errors during grails install-plugin

Hey,

I'm trying to install grails image tool 1.0.5 but I alway have those errors http://paste.ubuntu.com/6001937/ ..

I'm sure that I don't did something wrong, my BuildConfig.groovy is OK..

Some errors are due to a wrong name of the jars, for example there is no /usr/share/grails/2.0.4/lib/commons-collections/commons-collections/jars/commons-collections-3.1.jar in my HD but there is /usr/share/grails/2.0.4/lib/commons-collections/commons-collections/jars/commons-collections-3.2.1.jar in other cases there is no file/directory.. :/

Any idea?!

Cannot resolve class ImageTool

Hi I'm getting the following error trying to get started with your plugin. I tried adding the package but then a new error comes up. What am I doing wrong? I'm using 1.3.4.

Exception Message: startup failed: com.mashon.thumbnail.generator.ImageController: 31: unable to resolve class ImageTool @ line 31, column 20. def imageTool = new ImageTool(); ^ 1 error
Caused by: startup failed: com.mashon.thumbnail.generator.ImageController: 31: unable to resolve class ImageTool @ line 31, column 20. def imageTool = new ImageTool(); ^ 1 error
Class: com.mashon.thumbnail.generator.ImageController
At Line: [31]
Code Snippet:
30:
31: def imageTool = new ImageTool();
32: imageTool.load(output.toByteArray());

No ImageEncoder is available for this format

Hi guys,

I have encountered a problem with the ImageTools plugin when deploying my Grails app (as a war). Or maybe not with the plugin per se, but with the JAI package. This is the error:

2011-01-23 18:48:48,412 [TP-Processor16] [tenant N/A] ERROR errors.GrailsExceptionResolver - Encode No ImageEncoder is available for this format or this image cannot be encoded with the given encoding parameters.
java.lang.IllegalArgumentException: Encode No ImageEncoder is available for this format or this image cannot be encoded with the given encoding parameters.
at javax.media.jai.JAI.createNS(JAI.java:1087)
at javax.media.jai.JAI.create(JAI.java:973)
at javax.media.jai.JAI.create(JAI.java:1668)
at javax.media.jai.JAI$create$1.call(Unknown Source)
at org.grails.plugins.imagetools.ImageTool.getBytes(ImageTool.groovy:146)
at org.grails.plugins.imagetools.ImageTool$getBytes.call(Unknown Source)
at nl.gentleware.zzpadm.DocumentController$_closure15.doCall(DocumentController.groovy:578)
at nl.gentleware.zzpadm.DocumentController$_closure15.doCall(DocumentController.groovy)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
at java.lang.Thread.run(Thread.java:662)

The exception occurs when running the follwing bit of code:

    // resize the image, if necessary
    def imageTool = new ImageTool()
    imageTool.load(content)
    imageTool.thumbnailSpecial(350,50,1,1)
    // set imageTool contentType
    def imageToolContentType
    if (contentType == 'image/gif') {
        imageToolContentType = 'GIF'
    }
    else if (contentType == 'image/png')  {
        imageToolContentType = 'PNG'
    }
    else {
        imageToolContentType = 'JPEG'
    }
    // upload the file
    docId = documentService.saveAccountDocument(fileName,contentType,'ACCOUNT_LOGO',imageTool.getBytes(imageToolContentType),true)

The strange thing is, the exception does NOT occur on my development environment (Windows7) and also NOT on my test environment (Ubuntu/Tomcat), but only on my production environment... This is the technology stack on my production server:

    Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
    Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
    apache-tomcat-6.0.29.tar.gz
    Server version: Apache/2.2.3
    Server built:   Aug 30 2010 12:28:40

Does anybody have a clue what could be wrong?

Kind regards,

Pieter

(skilled in Grails, but not skilled at all in Java)

ImageTool.load() fails in war

Hi,

Thanks for the ImageTools plugin!

I have been trying to use the image-tools plugin in my grails application. It works as expected when running in InteliJ or under 'grails run-app' but is failing when I deploy it as a war in Tomcat.

I have been persisting the image files to the database (it fails for both hSQLdb and PostgreSQ data sources)/ The problems occurs when I create and image from the stored byte [] object in production.

I have made s small test app that demonstrates the problem.

domain class:

class Image {
byte [] img
static constraints = {
}
}

controller:

class ImageController {
...
...
...

def getImageThumbnail = {
    def imageInstance = Image.get(params.id)

    def imageTool = new ImageTool()

    println "starting load"
    imageTool.load(imageInstance.img)
    println "done!"

    imageTool.thumbnail(55)
    def thumbImage = imageTool.getBytes("JPEG")

    response.contentType = "image/jpeg"
    response.contentLength = thumbImage.length
    response.outputStream << thumbImage
}

(I have trimmed things down to the bare essentials here)

the point is the getImageThumbnail action works fine in development, but fails when I build a war and deploy it in Tomcat.

I don't think it is the Tomcat config - my other web apps and other aspects of the app work fine, but the getImageThumbnail action fails at the ImageTool.load call. In other words the output to the log file is the single line
'starting load' and the app hangs

What am I doing wrong?

Mike

Please apply README

Hey

Can you please apply A README file with at least the same comment as on Grails plugin page and hopefully with some demos of usage in UI

i cant install image-tools 1.0.5 since a source .zip, how can do it?

i follow the steps of http://grails.org/plugin/image-tools

Download here:https://github.com/ricardojmendez/grails-imagetools/archives/master

Un-(zip/tar) into new directory. Execute the following commands:

cd (new directory)
grails upgrade
grails create-plugin ImageTools
grails package-plugin
dir *.zip (to get the full name of the created plugin)
cd (to your project using the plugin)

grails install-plugin (path to created plugin)

and to do it a got :

| Configuring classpath
:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#image-tools;1.0.5
==== grailsPlugins: tried
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/home/link/web/olason/lib/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/ivy-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/jars/image-tools-1.0.5.zip
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/bundles/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/src/libs/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/src/libs/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/dist/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/dist/image-tools-1.0.5.zip
==== grailsHome: tried
/home/link/.grails/2.0.0/cached-installed-plugins/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/home/link/.grails/2.0.0/cached-installed-plugins/image-tools-1.0.5.zip
==== grailsHome: tried
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/plugins/image-tools-1.0.5.zip
==== grailsCentral: tried
http://plugins.grails.org/grails-image-tools/tags/RELEASE_1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://plugins.grails.org/grails-image-tools/tags/RELEASE_1.0.5/grails-image-tools-1.0.5.zip
==== http://repo.grails.org/grails/plugins: tried
http://repo.grails.org/grails/plugins/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://repo.grails.org/grails/plugins/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.zip
==== http://repo.grails.org/grails/core: tried
http://repo.grails.org/grails/core/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://repo.grails.org/grails/core/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.zip
==== grailsCore: tried
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-image-tools/tags/RELEASE_1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-image-tools/tags/RELEASE_1.0.5/grails-image-tools-1.0.5.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#image-tools;1.0.5: not found
::::::::::::::::::::::::::::::::::::::::::::::

:: problems summary ::
:::: WARNINGS
module not found: org.grails.plugins#image-tools;1.0.5
==== grailsPlugins: tried
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/home/link/web/olason/lib/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/ivy-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/jars/image-tools-1.0.5.zip
/etc/grails-2.0.0/lib/org.grails.plugins/image-tools/bundles/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/src/libs/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/src/libs/image-tools-1.0.5.zip
==== grailsHome: tried
/etc/grails-2.0.0/dist/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/dist/image-tools-1.0.5.zip
==== grailsHome: tried
/home/link/.grails/2.0.0/cached-installed-plugins/image-tools-1.0.5.xml
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/home/link/.grails/2.0.0/cached-installed-plugins/image-tools-1.0.5.zip
==== grailsHome: tried
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
/etc/grails-2.0.0/plugins/image-tools-1.0.5.zip
==== grailsCentral: tried
http://plugins.grails.org/grails-image-tools/tags/RELEASE_1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://plugins.grails.org/grails-image-tools/tags/RELEASE_1.0.5/grails-image-tools-1.0.5.zip
==== http://repo.grails.org/grails/plugins: tried
http://repo.grails.org/grails/plugins/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://repo.grails.org/grails/plugins/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.zip
==== http://repo.grails.org/grails/core: tried
http://repo.grails.org/grails/core/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://repo.grails.org/grails/core/org/grails/plugins/image-tools/1.0.5/image-tools-1.0.5.zip
==== grailsCore: tried
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-image-tools/tags/RELEASE_1.0.5/image-tools-1.0.5.pom
-- artifact org.grails.plugins#image-tools;1.0.5!image-tools.zip:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-image-tools/tags/RELEASE_1.0.5/grails-image-tools-1.0.5.zip
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.grails.plugins#image-tools;1.0.5: not found
::::::::::::::::::::::::::::::::::::::::::::::

| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

  • org.grails.plugins:image-tools:1.0.5

so try with this source online :
http://www.arquetipos.co.cr/blog/files/grails-image-tools-1.0.5.zip
http://blog.labrat.info/wp-content/uploads/2011/01/grails-image-tools-1.0.5.zip

and the same result.

i hope can help me!, sorry for my bad inglish.

Thanks!

JAI problem

Hey!

I beleive that I have a problem related to JAI libs โ†’ http://stackoverflow.com/q/24166056/1984774

In the Grails Plugin page you talked about a problem with JAI, and mentionned a link the get rid of the problem, but the link in the FAQs section isn't valid. โ†’ http://www.nabble.com/get-rid-of-

Do you have any idea about the problem I get in the log file?

Do you have the valid link from the FAQs sesction?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.