Alien-FreeImage

 view release on metacpan or  search on metacpan

src/Source/FreeImage/PluginRAS.cpp  view on Meta::CPAN

							bits[FI_RGBA_ALPHA] = *(bp++);	// alpha
							bits[FI_RGBA_RED] = *(bp++);	// red
							bits[FI_RGBA_GREEN] = *(bp++);	// green
							bits[FI_RGBA_BLUE] = *(bp++);	// blue

							bits += 4;
						}
					}
					else {
						for (x = 0; x < header.width; x++) {
							bits[FI_RGBA_RED] = *(bp + 3);	// red
							bits[FI_RGBA_GREEN] = *(bp + 2); // green
							bits[FI_RGBA_BLUE] = *(bp + 1);	// blue
							bits[FI_RGBA_ALPHA] = *bp;		// alpha

							bits += 4;
							bp += 4;
						}
					}

					if (fill) {
						ReadData(io, handle, &fillchar, fill, rle);
					}
				}

				free(buf);
				break;
			}
		}
		
		return dib;

	} catch (const char *text) {
		if(dib) {
			FreeImage_Unload(dib);
		}
		FreeImage_OutputMessageProc(s_format_id, text);
	}

	return NULL;
}

// ==========================================================
//   Init
// ==========================================================

void DLL_CALLCONV
InitRAS(Plugin *plugin, int format_id) {
	s_format_id = format_id;

	plugin->format_proc = Format;
	plugin->description_proc = Description;
	plugin->extension_proc = Extension;
	plugin->regexpr_proc = RegExpr;
	plugin->open_proc = NULL;
	plugin->close_proc = NULL;
	plugin->pagecount_proc = NULL;
	plugin->pagecapability_proc = NULL;
	plugin->load_proc = Load;
	plugin->save_proc = NULL;
	plugin->validate_proc = Validate;
	plugin->mime_proc = MimeType;
	plugin->supports_export_bpp_proc = SupportsExportDepth;
	plugin->supports_export_type_proc = SupportsExportType;
	plugin->supports_icc_profiles_proc = NULL;
	plugin->supports_no_pixels_proc = SupportsNoPixels;
}



( run in 1.247 second using v1.01-cache-2.11-cpan-d7f47b0818f )