Re: ERAttachment Auto Scaling Configuration Option
Re: ERAttachment Auto Scaling Configuration Option
- Subject: Re: ERAttachment Auto Scaling Configuration Option
- From: Johnny Miller <email@hidden>
- Date: Fri, 29 Oct 2010 14:32:54 -1000
If I look at
ImageIOImageProcessorjnilib.m what it does is takes the greater between the resize height and the resize width and makes that the max pixel size. So, I'd like to change it that if the height is greater then it will take the original image's size and then calculate what the max width should be.
i.e.
if (! maxPixelSizeByWidth) { originalImage = CGImageSourceCreateThumbnailAtIndex(source, 0, (CFDictionaryRef)thumbnailOpts); NSInteger oWidth = CGImageGetWidth(originalImage); NSInteger oHeight = CGImageGetHeight(originalImage); maxPixelSize = (oWidth * maxPixelSize) / oHeight; }
but I'm struggling on build it >:(
I tried renaming the file but when I do that ERAttachment just ignores the native way and defaults back to Java.
Best,
Johnny On Oct 29, 2010, at 2:19 PM, Mike Schrag wrote: i seem to recall it tries to fit he image into a 90x90 square? it's a bit of a blur On Oct 29, 2010, at 5:09 PM, Johnny Miller wrote: Hi,
I'm using ERAttachment + JNI and I want an image upload to be auto scaled so that it's max height is X. The width is not a concern.
er.attachment.MyEntity.MyAttachmentRelationship.height=90
But when the image is scaled it sets the width to 90 and the height to something less. Is there a configuration that I'm missing? i.e.
er.attachment.MyEntity.MyAttachmentRelationship.width=auto
TIA,
Johnny Miller Kahalawai Media Corp
Johnny Miller Kahalawai Media Corp
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden