Discussion Groups

Timestamp on pictures taken with Ikon

  • Hello,

    I'm looking for integrating automatically the timestamp on the pictures taken with the Ikôn.

    Is this feature available ?

    Thank you !

  • Hi Bertrand,

    As usual I need to ask you some questions.  Smile

    1. What is the use case? 
    2. Do they want to timestamp on the image or in the EXIF data?
    3. Is the customer using their application to access the camera and take the picture? 
    4. Do they use DirectShow or ICS?

    Cheers,

    Dave

    The road to the impossible has only to be traveled

  • Hello Dave,

     

    1. What is the use case? I don't know exactly the use case. The need comes from a partner who has this request from his end customer.
    2. Do they want to timestamp on the image or in the EXIF data? Timestamp has to be on the image. Nice to have it in the EXIFas well.
    3. Is the customer using their application to access the camera and take the picture? They want to use the Demo software as a first step.
    4. Do they use DirectShow or ICS? No idea..

    Thank you

  • The new ICS SW has been recently updated to include timestamp and other data into ExIF header of the picture. This ICS SW supports only EP10 and OMNII product lines. We are working now to expand that support into WAP and IKON. I expect it to be released for IKON in July.

  • Alex,

    Although the EXIF data is nice for this customer, the main requirement is a stamp on the image. 

    Bertrand,

    Can you find out more as to why they need the stamp on the image and why the EXIF would not be enough?

    The road to the impossible has only to be traveled

  • Hi All,

    I also have a request from a large FMCG company who takes pictures of the shelves in markets, and they need information printed over the image (time, date, user, and some other info, taken from our SW solution). The terminal is EP10.

  • Dave Degrassi

    Bertrand,

    Can you find out more as to why they need the stamp on the image and why the EXIF would not be enough?

    Hello Dave,

    EXIF are not directly human readable, you need to open the pictures or see its properties. When the timestamp is on the picture, you get the information just by looking at the picture. The information is available even if the picture is printed or embedded in a document.

    Regards,

  • Hi Bertrand,

    Understood.  After some internal discussions regarding this I would say that the next step would be to submit Feature Request so that we can capture all the requirements and evaluate the time/effort for implementation.

    Dave

    The road to the impossible has only to be traveled

  • Hello Dave,

    Ok, I'll see with the partner what is the volume concerned, and submit the Feature Request.

    Thank you !

  • Hi,

    We have the same request from an Estonian customer to have a date-time stamp on the picture.

  • Hello Bertrand,

    My customer also requires timestamps on their photos. I manually add the timestamp each time they commit a photo permanently in our system. Just to make sure the whole stamp is visible, I overlay white font on top of a pre-sized black rectangle that then gets overlayed onto the picture, like so (in C#):

    // first look for our black rectangle background, if not found, create one and save it to our application's directory

    string imgStampRectanglePath = @"\<your dir>\<your app>\imgStampRect.jpg";
    if( !File.Exists( imgStampRectanglePath ) )
    {
        using( Bitmap imgStampRect = new Bitmap( 240, 35 ) )
        {
            using( Graphics graphics = Graphics.FromImage( imgStampRect ) )
            {
                using( SolidBrush brush = new SolidBrush( Color.Black ) )
                {
                    graphics.FillRectangle( brush, new Rectangle( 0, 0, 240, 35 ) );
                    imgStampRect.Save( imgStampRectanglePath, ImageFormat.Jpeg );
                }
            }
        }
    }

    // create new DateTime object from whatever timestamp you're using
    DateTime timestamp = new DateTime( _year, _month, _day, _hour, _minute, _second );

    // now draw timestamp onto our black rectangle and overlay it onto our image, then save the new image
    using( Bitmap imgTimeStamp = new Bitmap( imgStampRectanglePath ) )
    {
        // add timestamp to background rectangle
        using( Graphics graphics = Graphics.FromImage( imgTimeStamp ) )
        {
            // using a DateTime object to write this string makes for prettier code, but isn't necessary
            graphics.DrawString( timestamp.ToString( "MM/dd/yyyy HH:mm" ), new Font( "Arial", 9F, FontStyle.Bold ), new SolidBrush( Color.White ), 5, 5 );
        }

        // create new file path/name to save altered image to (we save to JPEG for our customers)
        string newFilePath = @"newDir\newSubdir\newPhotoName.jpg";

        // overlay timestamp and save new image
        try
        {
            using( Bitmap rawImage = new Bitmap( @"oldDir\oldSubdir\oldPhotoName.bmp" ) )
            {
                // if you have any need to rotate the image
                using( Bitmap newImage = ImageUtils.Rotate( rawImage, RotationAngle.foo ) )
                {
                    using( Graphics graphics = Graphics.FromImage( newImage ) )
                    {
                        // overlay timestamp rectangle in bottom left corner
                        graphics.DrawImage( imgTimeStamp, 0, newImage.Height - 35 );
                        // save image, and viola!
                        newImage.Save( newFilePath, ImageFormat.Jpeg );
                    }
                }
            }
        }
        catch( Exception ex )
        {
            // handle exceptions as appropriate
        }
    }

    Hope this helps!!

  • Hello,

    Thank you for sharing this code.

    Best regards,