I am attempting to load a jpeg image into a vImage_Buffer.
I am just trying to get the data in an ARGB format. This code works fine in the Xcode 15 build , but fails with kvImageInvalidParameter error from vImageBuffer_InitWithCGImage in the Xcode 26 build.
This code is written in ObjectiveC++.
Here is a code fragment:
int CDib_ARGB::Load(LPCSTR pFilename)
{
int rc = 0;
if (NULL == m_pRaw_vImage_Buffer)
{
NSString *pNS_filename = [[NSString alloc]initWithUTF8String:pFilename];
NSImage *pNSImage = [[NSImage alloc] initWithContentsOfFile:pNS_filename];
if (nil == pNSImage)
rc = -1;
else
{
int width = pNSImage.size.width;
int height = pNSImage.size.height;
if (pNSImage.representations)
{
NSImageRep *imageRep;
int jj;
width = 0;
height = 0;
for (jj = 0; jj < pNSImage.representations.count; jj++)
{
imageRep = pNSImage.representations[jj];
if (imageRep.pixelsWide > width)
width = imageRep.pixelsWide;
if (imageRep.pixelsHigh > height)
height = imageRep.pixelsHigh;
}
}
NSSize imageSize = NSMakeSize(width, height);
NSRect imageRect = NSMakeRect(0, 0, width, height);
pNSImage.size = imageSize;
CGImageRef cgImage = [pNSImage CGImageForProposedRect:&imageRect context:NULL hints:nil];
if (nil == cgImage)
rc = -1;
else
{
//Alloc and load vImage_Buffer.
vImage_Buffer *pvImage_Buffer = new vImage_Buffer;
if (NULL == pvImage_Buffer)
rc = -1;
else
{
vImage_CGImageFormat format;
format.bitsPerComponent = 8;
format.bitsPerPixel = 32;
format.colorSpace = nil;
format.bitmapInfo = kCGImageAlphaFirst | kCGBitmapByteOrderDefault;//ARGB8888
format.version = 0;
format.decode = nil;
format.renderingIntent = kCGRenderingIntentDefault;
memset(pvImage_Buffer, 0, sizeof(vImage_Buffer));
long status = vImageBuffer_InitWithCGImage(pvImage_Buffer, &format, nil, cgImage, kvImagePrintDiagnosticsToConsole);
if (kvImageNoError != status)
{ //This is where Xcode 26 sends me.
delete pvImage_Buffer;
rc = -1;
}
=========================
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I attempted to create an ad campaign for an app in the MacOS App Store, but the Apple ads website does not seem to allow this. The Apple ads website seems to assume that my app is in the iOS App Store.
Clearly the MacOS App Store is not a priority, but this has been unreasonably difficult and confusing.
Can someone please tell me if Search ads in the MacOS App Store are supported, and if so, how can I access this support?