Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QTNewGWorldFromPtr for large width images



At 9:30 -0500 31-05-2005, Scott Thompson wrote:
On May 30, 2005, at 4:58 PM, Pradeep Kumar wrote:
I am using the OpenGL Image sample code to open a panorama image with dimensions 7000+
X 3000+ pixels. It leaves a big rectangle of black area on the top left area when displaying in
the window. I open the same image in qtgraphics QuickTime sample code and the image
displays fine in the window. Although the code used in both these sample code uses Graphic
Importer component to draw the only difference is that in the qtgraphics renders the image to
a window and the OpenGL image sample code renders the image to a GWorld created using
QTNewGWorldFromPtr.


Is there a difference between the GWorld created by QTNewGWorld and NewGWorld variants
and the one that is created for the window by NewCWindow?
There really shouldn't be any difference between the ports created by all of these methods, unless you are using different pixel formats. QTNewGWorld allows you to create GWorlds with pixel types that that QuickDraw doesn't understand.
I realize that the rowBytes parameter is a limiting factor of GWorld, but is there a way to work around this?

At 7000 pixels wide your rowBytes should be somewhere in the neighborhood of 28000. This is certainly a small enough number to fit into a long valued variable like the rowBytes. How do you find the "rowByes" parameter to be a limiting factor?


It seems to me that rowBytes in a QuickDraw PixMap is a short (16 bits) and the max value is 0x7FFF but I remember from some the OS8 sources that you can not create RGB pixmap with more than 4000 points.


Santino _______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >QTNewGWorldFromPtr for large width images (From: "Pradeep Kumar" <email@hidden>)
 >Re: QTNewGWorldFromPtr for large width images (From: Scott Thompson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.