From: Thomas W. <tho...@gm...> - 2011-01-14 23:15:11
|
Code from the trunk, clean build. I piece of code that use to work, does not scale images anymore. I receive an error 'Unable to read image data' in the log when I use image:scale. I was wandering if some of the latest changes in the binary format may require some changes in my code or there is something else? Bellow is a code that can reproduce the issue. Replace the line image:scale... with $img to display the original image. This is a problem is a showstopper in a pre-production system and I will highly appreciate if somebody can help. Regards, Thomas ------------------------------------------- xquery version "1.0" encoding "UTF-8"; import module namespace image=http://exist-db.org/xquery/image; import module namespace xdb="http://exist-db.org/xquery/xmldb"; let $pathToBinaryResource := '/db/images/026.jpg' let $original-path := '/exist/images/026.jpg' let $img := util:binary-doc( xs:anyURI($pathToBinaryResource ) ) return response:stream-binary( image:scale($img, (100, 100 ), 'image/jpeg' ), 'image/jpeg' , xs:anyURI( $original-path ) ) ------ Thomas White Mobile:+44 7711 922 966 Skype: thomaswhite gTalk: thomas.0007 http://www.linkedin.com/in/thomaswhite0007 http://www.facebook.com/thomas.0007 |