Menu

Images

2017-12-06
2018-02-13
  • Henrique Aschenbrenner

    Hello, is it possible for me to include an image in a spreadsheet? Which class should I use?

    Regards,
    Henrique Aschenbrenner

     
  • Alexandr Belyak

    Alexandr Belyak - 2017-12-07

    Hi Henrique,

    At the moment this is not possible. Approximately in a month I will have time to study this task.

     
  • Alexandr Belyak

    Alexandr Belyak - 2017-12-25

    I added initial support for images. Check the attached archive with the new source code.
    See CWorkbook::AddImage. Supported image formats: gif, jpg, png, tif.
    Please tell me know the results of the checking.

     
  • E.Naumovich

    E.Naumovich - 2017-12-29

    Hi,
    I have minor general correction. I will submit it as soon as check its compatibility with current version. (Tomorrow?)

     
  • Alexandr Belyak

    Alexandr Belyak - 2017-12-29

    Ok, I'll be glad with your library improvements. I'll try to check them quickly.
    If it does not complicate you, try to check the work with the images.

     
  • E.Naumovich

    E.Naumovich - 2017-12-31

    Hi,
    I added few lines (203-208) to Worksheet.cpp to store empty cells with format (borders, fill...).
    Example is in simple.cpp in attach.
    I checked import of the images (png, jpg, tiff). In general it works. It is not really handy, but I dont know is it possible to make it better. If it is possible to make import in manner
    AddImage(Sheet,FileName, TopLeftCorner,Scale(in%)) - it should be better.
    Happy New Year,
    EN

     
  • Alexandr Belyak

    Alexandr Belyak - 2018-01-01

    Hi,
    Thank you for the improvement of the library, checking and the idea about a new way of adding images.
    Unfortunately Excel does not save the image size in percentages, so need byself to determine the image dimensions byself and convert them to Excel format. I will try to do it soon.
    Happy New Year,
    Alexandr

     
  • Alexandr Belyak

    Alexandr Belyak - 2018-01-04

    Hi,
    It seems I did. I will be grateful to everyone who will check the addition of images.
    Now there are two ways for adding image by using CWorkbook::AddImage:
    1) binding on two cells (anchored)
    2) scaling on axes X and Y, in percent
    Please see "Images.cpp" and "Images.xlsx" in examples for details.

     
  • E.Naumovich

    E.Naumovich - 2018-01-08

    Happy NY2018,
    I tested images and styles - looks OK.
    Just for info: gcc version 7.1.0 (i686-posix-dwarf-rev2, Built by MinGW-W64 project)
    Win10 64

     
  • Alexandr Belyak

    Alexandr Belyak - 2018-01-10

    Thanks for the help :-) Then I will upload an updated version of the library to the main page.

     
  • jordi73

    jordi73 - 2018-02-12

    I can add the jpgs from the samples and the png files, even generated from me png files :-) , but INFO: I can not add the generated from me jpg attached. It is saved from VTK, probably some options like compression or so are different. It seems the code has some problem to get its size, I get size 0 and 0 at the corresponding line. VS2017, 64 bit, win8.1

     
  • Alexandr Belyak

    Alexandr Belyak - 2018-02-13

    Thank you for message. I tried to repeat your problem - there is no problem with your attached JPG file (Windows 7, VS2017 SDK 8.1 32/64 bit).

    Please check my attached simple project. The project has a new version of the library, but there are no changes in the work with the images.

    Maybe you have a problem with the path to the image file?
    If the problem persists, then please send your minimal problem project for verification.

     

Log in to post a comment.

MongoDB Logo MongoDB