• Home
  • Raw
  • Download

Lines Matching refs:lc

148 pump_data(Image *image, LoadContext* lc)
156 ddjvu_stream_write(lc->document, lc->streamid, data, size);
159 ddjvu_stream_write(lc->document, lc->streamid, data, size);
160 ddjvu_stream_close(lc->document, lc->streamid, 0);
166 pump_data_until_message(LoadContext *lc,Image *image) /* ddjvu_context_t *context, type ddjvu_docum… in pump_data_until_message() argument
175 while (!(message = ddjvu_message_peek(lc->context)) in pump_data_until_message()
177 ddjvu_stream_write(lc->document, lc->streamid, (char *) data, size); in pump_data_until_message()
182 ddjvu_stream_write(lc->document, lc->streamid, (char *) data, size); in pump_data_until_message()
183 ddjvu_stream_close(lc->document, lc->streamid, 0); in pump_data_until_message()
237 LoadContext *lc = (LoadContext *) ddjvu_document_get_user_data(document); in process_message() local
238 lc->pages = ddjvu_document_get_pagenum(document); in process_message()
325 get_page_image(LoadContext *lc, ddjvu_page_t *page, int x, int y, int w, int h, ExceptionInfo *exce… in get_page_image() argument
348 image = lc->image; in get_page_image()
349 type = ddjvu_page_get_type(lc->page); in get_page_image()
462 get_page_line(LoadContext *lc, int row, QuantumInfo* quantum_info)
479 rect.w = lc->image->columns; /* /10 */
484 pagerect.w = lc->image->columns;
485 pagerect.h = lc->image->rows;
503 q = (unsigned char *) AcquireQuantumMemory(lc->image->columns,stride);
505 ret = ddjvu_page_render(lc->page,
513 ImportQuantumPixels(lc->image,
521 ,q,&lc->image->exception);
560 static Image *ReadOneDJVUImage(LoadContext* lc,const int pagenum, in ReadOneDJVUImage() argument
576 image = lc->image; in ReadOneDJVUImage()
586 lc->page = ddjvu_page_create_by_pageno(lc->document, pagenum); /* 0? */ in ReadOneDJVUImage()
591 while ((message = ddjvu_message_peek(lc->context))) in ReadOneDJVUImage()
595 ddjvu_message_pop(lc->context); in ReadOneDJVUImage()
600 message = pump_data_until_message(lc,image); in ReadOneDJVUImage()
605 ddjvu_message_pop(lc->context); in ReadOneDJVUImage()
606 } while ((message = ddjvu_message_peek(lc->context))); in ReadOneDJVUImage()
608 } while (!ddjvu_page_decoding_done(lc->page)); in ReadOneDJVUImage()
610 ddjvu_document_get_pageinfo(lc->document, pagenum, &info); in ReadOneDJVUImage()
634 type = ddjvu_page_get_type(lc->page); in ReadOneDJVUImage()
675 get_page_image(lc, lc->page, 0, 0, info.width, info.height, exception); in ReadOneDJVUImage()
682 get_page_line(lc, i, quantum_info); in ReadOneDJVUImage()
701 if (lc->page) { in ReadOneDJVUImage()
702 ddjvu_page_release(lc->page); in ReadOneDJVUImage()
703 lc->page = NULL; in ReadOneDJVUImage()
728 static void djvu_close_lc(LoadContext* lc) in djvu_close_lc() argument
730 if (lc->document) in djvu_close_lc()
731 ddjvu_document_release(lc->document); in djvu_close_lc()
732 if (lc->context) in djvu_close_lc()
733 ddjvu_context_release(lc->context); in djvu_close_lc()
734 if (lc->page) in djvu_close_lc()
735 ddjvu_page_release(lc->page); in djvu_close_lc()
736 RelinquishMagickMemory(lc); in djvu_close_lc()
757 *lc; in ReadDJVUImage() local
785 lc = (LoadContext *) NULL; in ReadDJVUImage()
804 lc = (LoadContext *) AcquireMagickMemory(sizeof(*lc)); in ReadDJVUImage()
805 if (lc == NULL) in ReadDJVUImage()
812 (void) memset(lc,0,sizeof(LoadContext)); in ReadDJVUImage()
814 lc->image = image; in ReadDJVUImage()
815 lc->pages = 0; in ReadDJVUImage()
816 lc->context = ddjvu_context_create("ImageMagick djvu loader"); /* g_program_name */ in ReadDJVUImage()
818 ddjvu_cache_set_size(lc->context, 1); /* right? */ in ReadDJVUImage()
822 lc->document = ddjvu_document_create(lc->context, url, use_cache); /* don't cache */ in ReadDJVUImage()
823 ddjvu_document_set_user_data(lc->document, lc); in ReadDJVUImage()
827 message = ddjvu_message_wait(lc->context); in ReadDJVUImage()
832 ddjvu_document_release(lc->document); in ReadDJVUImage()
833 ddjvu_context_release(lc->context); in ReadDJVUImage()
835 RelinquishMagickMemory(lc); in ReadDJVUImage()
841 lc->streamid = message->m_newstream.streamid; in ReadDJVUImage()
842 ddjvu_message_pop(lc->context); in ReadDJVUImage()
844 message = pump_data_until_message(lc,image); in ReadDJVUImage()
850 ddjvu_message_pop(lc->context); in ReadDJVUImage()
851 } while ((message = ddjvu_message_peek(lc->context))); in ReadDJVUImage()
855 while (lc->pages == 0) { in ReadDJVUImage()
856 message = ddjvu_message_wait(lc->context); in ReadDJVUImage()
858 ddjvu_message_pop(lc->context); in ReadDJVUImage()
865 for ( ; i < (ssize_t) lc->pages; i++) in ReadDJVUImage()
867 image=ReadOneDJVUImage(lc,i,image_info,exception); in ReadDJVUImage()
877 djvu_close_lc(lc); in ReadDJVUImage()