crop - Grails 2.3.1 and burning image service plugin -
crop - Grails 2.3.1 and burning image service plugin -
i have installed , correctly configured :burning-image:0.5.1
on grails application.
i can upload images , retrieve them.
now want retrieve saved image , manipulate it.
the goal give link registered user can crop original avatar when want.
here configuration in config.groovy user instance :
import pl.burningice.plugins.image.engines.scale.scaletype bi.user = [ outputdir: 'upload/avatar', images: ['normal': [scale:[width: 800, height: 600, type: scaletype.approximate]], 'small': [scale:[width:100, height:100, type:scaletype.accurate]]] ]
here field container in user class :
import pl.burningice.plugins.image.ast.fileimagecontainer @fileimagecontainer(field = 'avatar') class user { /* ... */ }
i'm trying retrieve , manipulate 'normal' image modify 'small' 1 allowing user crop original image :
imageuploadservice.save(user, {avatar, name -> })
but next error : uploaded image null
.
i read documentation , found lot of advices manipulate image when uploaded, before saving, not manipulate existing image.
i miss can't figure out, help welcome.
grails crop grails-plugin avatar grails-2.3
Comments
Post a Comment