javascript - Determine image dimensions for image stored in GridFS from meteor -
I'm trying to determine the width of an image stored in the grid on summer so that I can resize a modal dialog Can do
I have a helper for the template
Template.projectImageModalInner.image = function () {var imageId = Session.get ("selectedImageId"); //console.log ("Plug-in Image Model Inner Image:" + imageId); Var image = imageFS.findOne ({_ id: imageId}); Url = image.fileHandler.default1.url; Console.log (url); Console.log (Imagemagick.identify (url)); Return imageFS.findOne ({_ id: imageId}); } displaying the correct image to display, but I'm really having trouble getting the shape. Call Imagemagick. The identity can not be identified on an undefined method to "blow up" with an error, even though the above line print the correct URL.
Console log for image URL shows
/cfs/images/i5mSRED6mYgo2vK84_default1.jpg The correct image displayed in the template URL is
I want to set a session, eventually make changes in the width of the image so that the dialog is dynamically shaped.
I have tried to get this size from HTML (no joy) from other assistants, but nothing is working till now.
Can anyone say what I am doing wrong here, or can I suggest another way? I think that you will have to use the GraphicSocial / ImageMagic Library on the server-side after uploading to get the image size.
First, code> gm.size () , then attach those values to those
- 's-metadata < Li>
Comments
Post a Comment