javascript - Image manipulation in Meteor -


i uploading images in meteor collectionfs.

it works interested in creating thumbnails images.

i have followed https://github.com/collectionfs/meteor-collectionfs#image-manipulation cannot graphicsmagick work.

if use

var createthumb = function(fileobj, readstream, writestream) {   readstream.pipe(writestream); }; 

the code works image not resized (the thumbnail equals orginal image should). when call

gm(readstream, fileobj.name()).resize('10', '10').stream().pipe(writestream); 

to resize image 10x10 thumbnail, code works thumbnail not created correctly. thumbnail created size 0kb. suspect graphicsmagick not installed correctly. have downloaded , installed windows binary , added cfs:graphicsmagick packages.

are there alternatives graphicsmagick? rather avoid using third parties since graphicsmagick not installed on meteor's free development servers , want app portable. maybe image manipulation such advanced task cannot done directly in javascript code?

did these steps?

https://github.com/collectionfs/meteor-collectionfs#image-manipulation

a common use transformwrite manipulate images before saving them. set up:

  • install graphicsmagick or imagemagick on development machine , on server host app. (the free meteor deployment servers not have either of these, can't deploy there.) these normal operating system applications, have install them using correct method os. example, on mac osx can use brew install graphicsmagick assuming have homebrew installed.

  • add cfs:graphicsmagick meteor package app: meteor add cfs:graphicsmagick


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -