Rotated NSImage drawAtPoint:... slow
-
I just finished working on a view that draws some stuff at an angle
including an NSImage created from a tiff with alpha. It worked great
in the test project with no noticeable performance issues. I
imported it into my main project and hooked it into my view hierarchy
and it now hangs for about 8 seconds while loading the view. Looking
at samples all the time is being spent in -[NSBitmapImageRep
loadData] for that image (its only 138x188px). If I comment out the
drawAtPoint: call that draws the image the view loads without any
hang time. Any thoughts on why this would be happening? This is on
10.4.11.
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
<blachman...>
740.590.0009 -
Right, so never mind that post. I re-saved the image with preview
and it now loads without any hiccups. Anyone know the implecations
of a Photoshop TIFF versus one saved by Preview?
Thanks,
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
<blachman...>
740.590.0009
On Feb 20, 2008, at 4:04 PM, Ben Lachman wrote:> I just finished working on a view that draws some stuff at an angle
> including an NSImage created from a tiff with alpha. It worked
> great in the test project with no noticeable performance issues. I
> imported it into my main project and hooked it into my view
> hierarchy and it now hangs for about 8 seconds while loading the
> view. Looking at samples all the time is being spent in -
> [NSBitmapImageRep loadData] for that image (its only 138x188px).
> If I comment out the drawAtPoint: call that draws the image the
> view loads without any hang time. Any thoughts on why this would
> be happening? This is on 10.4.11. -
On 21/02/2008, at 8:13 AM, Ben Lachman wrote:> Anyone know the implecations of a Photoshop TIFF versus one saved
> by Preview?
Maybe the PS version was using LZW compression, a different byte
order, etc? TIFF encompasses a million variations, any one of them
could have been the cause.
--------
S.O.S. -
On Feb 20, 2008, at 1:13 PM, Ben Lachman wrote:> Right, so never mind that post. I re-saved the image with preview
> and it now loads without any hiccups. Anyone know the implecations
> of a Photoshop TIFF versus one saved by Preview?
Preview saves the tiffs as premultiplied images, photoshop doesn't.
Just save the original Photoshop files for editing latter (if you need
it)
Vince>
>
> Thanks,
>
> ->Ben
> --
> Ben Lachman
> Acacia Tree Software
>
> http://acaciatreesoftware.com
>
> <blachman...>
> 740.590.0009
>
>
>
> On Feb 20, 2008, at 4:04 PM, Ben Lachman wrote:
>
>> I just finished working on a view that draws some stuff at an angle
>> including an NSImage created from a tiff with alpha. It worked
>> great in the test project with no noticeable performance issues. I
>> imported it into my main project and hooked it into my view
>> hierarchy and it now hangs for about 8 seconds while loading the
>> view. Looking at samples all the time is being spent in -
>> [NSBitmapImageRep loadData] for that image (its only 138x188px).
>> If I comment out the drawAtPoint: call that draws the image the
>> view loads without any hang time. Any thoughts on why this would
>> be happening? This is on 10.4.11.


