• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERAttachment Auto Scaling Configuration Option
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.  

So I set the following in my properties file (per http://webobjects.mdimension.com/hudson/job/Wonder53/javadoc/er/attachment/package-summary.html)

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
http://www.kahalawai.com


Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.com



 _______________________________________________
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

References: 
 >ERAttachment Auto Scaling Configuration Option (From: Johnny Miller <email@hidden>)
 >Re: ERAttachment Auto Scaling Configuration Option (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: ERAttachment Auto Scaling Configuration Option
  • Next by Date: entity modeler settings?
  • Previous by thread: Re: ERAttachment Auto Scaling Configuration Option
  • Next by thread: Re: ERAttachment Auto Scaling Configuration Option
  • Index(es):
    • Date
    • Thread