View Full Version : memcpy?
would anyone please tell me what is the use of memcpy? give an example?
also how to create a luminance version of the original .JPEG file?
thanks for your time. =)
MEMCPY(3) Linux Programmer's Manual MEMCPY(3)
memcpy - copy memory area
void *memcpy(void *dest, const void *src, size_t n);
The memcpy() function copies n bytes from memory area src
to memory area dest. The memory areas may not overlap.
Use memmove(3) if the memory areas do overlap.
The memcpy() function returns a pointer to dest.
To create a luminance version of an image.
If you use image processing application just convert the image to levels of grey.
If you want to do it programmatically, then you have to compute the luminance value of each pixel by weighting its red green and blue values.
The coefficients are something like Rc=0.33, Gc=0.56, Bc=0,11.
Then Y = Rc x red + Gc x green + Bc x blue.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.