Decodificar imagens no segmento de segundo plano?

Eu tenho um thread de plano de fundo que carrega imagens e as exibe no thread principal. Notei que o thread de segundo plano não tem quase nada a ver, porque a decodificação da imagem real parece ser feita no thread principal:

Até agora eu tentei ligar[UIImage imageNamed:], [UIImage imageWithData:] eCGImageCreateWithJPEGDataProvider no segmento de plano de fundo sem diferença. Existe uma maneira de forçar a decodificação a ser realizada no encadeamento em segundo plano?

Já existeuma pergunta semelhante aqui, mas isso não ajuda. Enquanto escrevi lá, tentei o seguinte truque:

@implementation UIImage (Loading)

- (void) forceLoad
{
    const CGImageRef cgImage = [self CGImage];  

    const int width = CGImageGetWidth(cgImage);
    const int height = CGImageGetHeight(cgImage);

    const CGColorSpaceRef colorspace = CGImageGetColorSpace(cgImage);
    const CGContextRef context = CGBitmapContextCreate(
        NULL, /* Where to store the data. NULL = don’t care */
        width, height, /* width & height */
        8, width * 4, /* bits per component, bytes per row */
        colorspace, kCGImageAlphaNoneSkipFirst);

    NSParameterAssert(context);
    CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage);
    CGContextRelease(context);
}

@end

Isso funciona (força a imagem a decodificar), mas também aciona uma chamada aparentemente cara paraImageIO_BGR_A_TO_RGB_A_8Bit.

questionAnswers(2)

yourAnswerToTheQuestion