Results 1 to 3 of 3

Thread: memcpy?

  1. #1
    Guest

    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. =)

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    417

    Re: memcpy?

    Code :
     
     
    MEMCPY(3)           Linux Programmer's Manual           MEMCPY(3)
     
    NAME
           memcpy - copy memory area
     
    SYNOPSIS
           #include <string.h>
     
           void *memcpy(void *dest, const void *src, size_t n);
     
    DESCRIPTION
           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.
     
    RETURN VALUE
           The memcpy() function returns a pointer to dest.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Nice, France
    Posts
    201

    Re: memcpy?

    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.

Similar Threads

  1. Compiler specific memcpy issue to watch out for
    By tamlin in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 01-06-2008, 02:08 PM
  2. ATI, glMapBuffer and memcpy incompatible?
    By skynet in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-08-2006, 05:39 PM
  3. PDR, fast memcpy
    By Stephen Webb in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 02-27-2004, 07:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean