• 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: Rendering big PDF into thumbnail bitmap - too blurry
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rendering big PDF into thumbnail bitmap - too blurry


  • Subject: Re: Rendering big PDF into thumbnail bitmap - too blurry
  • From: "Oleg Krupnov" <email@hidden>
  • Date: Wed, 24 Sep 2008 09:24:46 +0300

Eurica!

Two things were wrong:

1) There was a 0.5 pixel shift transform in my graphics context
imposed earlier in the stack. I use this to render bezier curves to
integer pixels, but for rendering bitmaps this offset needs to be
reset. After fixing this, however, there was still a little blur, but
way less than before.

2) I switched to using NSBitmapImageRep and +[NSGraphicsContext
graphicsContextWithBitmapImageRep] instead of the offscreen NSImage
and lockFocus. The latter is obsolete BTW. See the example:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/chapter_7_section_5.html#//apple_ref/doc/uid/TP40003290-CH208-BCICHFGA
 (the "Drawing Directly to a Bitmap" section)



On Wed, Sep 24, 2008 at 8:48 AM, Oleg Krupnov <email@hidden> wrote:
> Yes, I tried it and it doesn't seem to have any effect.
>
> I have just double-checked regarding - [NSBitmapImageRep
> initWithFocusedViewRect]. For an experiment I saved the bitmap to a
> tiff file right after capturing the bitmap from screen, and it appears
> that the tiff is sharp, not blurry.
>
> It looks like the temporary thumbnail NSImage spoils the whole thing,
> but I can't figure out how to bypass it.
>
>
>
> On Wed, Sep 24, 2008 at 8:41 AM, Ken Thomases <email@hidden> wrote:
>> On Sep 24, 2008, at 12:33 AM, Oleg Krupnov wrote:
>>
>>> What could be the problem?
>>
>> Have you tried using -[NSGraphicsContext setImageInterpolation:] after
>> locking focus?
>>
>> Cheers,
>> Ken
>>
>>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Rendering big PDF into thumbnail bitmap - too blurry
      • From: Uli Kusterer <email@hidden>
References: 
 >Rendering big PDF into thumbnail bitmap - too blurry (From: "Oleg Krupnov" <email@hidden>)
 >Re: Rendering big PDF into thumbnail bitmap - too blurry (From: Ken Thomases <email@hidden>)
 >Re: Rendering big PDF into thumbnail bitmap - too blurry (From: "Oleg Krupnov" <email@hidden>)

  • Prev by Date: Re: Rendering big PDF into thumbnail bitmap - too blurry
  • Next by Date: Re: Rendering big PDF into thumbnail bitmap - too blurry
  • Previous by thread: Re: Rendering big PDF into thumbnail bitmap - too blurry
  • Next by thread: Re: Rendering big PDF into thumbnail bitmap - too blurry
  • Index(es):
    • Date
    • Thread