• Hello game master! Welcome to our growing community. Please take a moment to Register (top right button, see how: Slides).

    If you use Campaign Logger, you can use the same login details - we've linked the app to this forum for secure and easy single sign-on for you.

    And please drop by the Introductions thread and say hi.

Images in Log Entries and Generator Outputs

Hannu

Mythras Guru
Gold WoA
Wizard of Story
Wizard of Combat
hmm. Tried to use Pinterest images - they do not come up. The link works (I can click the broken looking icon and get to the image). Same goes for my Wordpress site images. I really would like to show my Pinterest images inline...
 

Hannu

Mythras Guru
Gold WoA
Wizard of Story
Wizard of Combat
index.php
 

Attachments

  • 2018-08-28_17-48-53.png
    2018-08-28_17-48-53.png
    16.3 KB · Views: 68

ELF

Generator Sage
Wizard of Story
Wizard of Combat
I don’t think Pinterest supports hotlinking like that. You need to host the images somewhere that allows it.
 

Hannu

Mythras Guru
Gold WoA
Wizard of Story
Wizard of Combat
I don’t think Pinterest supports hotlinking like that. You need to host the images somewhere that allows it.
But see above my hierarch conchero warrior - I can see the image here embedded but not in campaign logger - what is different...
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
But see above my hierarch conchero warrior - I can see the image here embedded but not in campaign logger - what is different...
That is not a directly inserted image - it shows the pin count, your Pinterest account link, etc. Xenforo does automatic embedding conversions for various media sites - it seems that Pinterest is one of those.
 

Hannu

Mythras Guru
Gold WoA
Wizard of Story
Wizard of Combat
That is not a directly inserted image - it shows the pin count, your Pinterest account link, etc. Xenforo does automatic embedding conversions for various media sites - it seems that Pinterest is one of those.

Could we as well do the conversion...
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Last edited:

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Image embeds seem to be finicky with tables. This works OK:
Code:
{
  "resultPattern": "|| {\"https://campaign-logger.com/image/icon/star.svg\"|star|img} || star \r\n|| star ||  {\"https://campaign-logger.com/image/icon/star.svg\"|star|img}"
}

But if I remove the first line of the table (up to the \r\n string), the image is no longer rendered:
Code:
{
  "resultPattern": "|| star ||  {\"https://campaign-logger.com/image/icon/star.svg\"|star|img}"
}

When I add something else to the image's table cell, it is again displayed:
Code:
{
  "resultPattern": "|| star ||  {\"https://campaign-logger.com/image/icon/star.svg\"|star|img} I'm a star on the Internet!"
}

This exercise is also a good demonstration on how the embedded SVG image scales to fill in the available space.

The problem could be more related to SVG scaling than image or table rendering - seems that with the empty cell to image is scaled to zero size, although it shouldn't be:
Code:
{
  "resultPattern": "|| star ||  {\"https://campaign-logger.com/image/icon/star.svg\"|star|img} || I'm a star!"
}

Edit: Seems like a browser bug, as the image disappears on Firefox, Chrome and Vivaldi (which is Chrome-based), but displays fine on Edge and even Internet Explorer(!).
 
Last edited:

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
I just checked that - it is due to the behavior of the table cell width calculation - it is based on the text entered in the cell. Maybe the SVG has no minimum width set?
 
  • Like
Reactions: ELF

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Thanks for checking that out. So it seems there is one additional factor to consider when adding entries to the image bank.
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
But we would need to add a license file for each image with:
  • Name of the author
  • Source of the image
  • License under which the image is used
I abandoned my first attempt as too inefficient and am now collecting the license info in JSON files together with the image bank variable definitions:
Code:
    {
      "name": "arrow-aiga",
      "explanation": "Arrow symbols by AIGA.",
      "license": "copyright-free",
      "source": "https://openclipart.org/user-detail/jean_victor_balin",
      "design": "Roger Cook, Don Shanosky",
      "conversion": "Jean-Victor Balin",
      "entries": [
        {
          "v": "",
          "export": {
            "bank": "arrow",
            "img-arrow-down": "{\"{g:dir}{g:bank}/aiga-down-arrow.svg\"|down|img}",
            "img-arrow-left": "{\"{g:dir}{g:bank}/aiga-left-arrow.svg\"|left|img}",
            "img-arrow-right": "{\"{g:dir}{g:bank}/aiga-right-arrow.svg\"|right|img}",
            "img-arrow-up": "{\"{g:dir}{g:bank}/aiga-up-arrow.svg\"|up|img}"
          }
        }
      ]
    },

Still, it might be better to have a separate LICENSE.TXT file in each image bank directory when the collections are more or less ready. So far I have collected only public domain images, so the license requirements are simple.

(BTW, it's a pity that variable names cannot contain variables - when collecting this data, it could be handy if the names of the callable variables could include the image bank name derived from the related variable...)
 

JochenL

CL Byte Sprite
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Borderland Explorer
I am intending to write a script which delivers images from the library with license info attached (via HTTP headers) - I can easily assemble a license.txt based on your JSON...

The problem is that German law requires the naming of author/source of an image, and that all copyright laws require a license to use an image.
 
  • Like
Reactions: ELF

ELF

Generator Sage
Wizard of Story
Wizard of Combat
I am intending to write a script which delivers images from the library with license info attached (via HTTP headers) - I can easily assemble a license.txt based on your JSON...
That would be great! One less thing to worry about, and more time for more productive tasks.

The problem is that German law requires the naming of author/source of an image, and that all copyright laws require a license to use an image.
Putting the image bank together indeed seems to require less work than documenting it to officials - and users. In an ideal case the library would document itself, but we are not there quite yet.

Currently you can initialize the image bank like this:
Code:
{lib:imagebank}

I thought it could be best to initialize the image banks one topic at at time, like {lib:imagebank#arrow} or {lib:imagebank#gender}. If the imagebank is called without a parameter, it outputs (too) brief instructions (with a randomized example):
CL imagebank output.png

But also that would be good to automatize, although I'm afraid that's not currently possible.
 

Rardian

Well-known member
Wizard of Story
Wizard of Combat
Borderland Explorer
hmm. Tried to use Pinterest images - they do not come up. The link works (I can click the broken looking icon and get to the image). Same goes for my Wordpress site images. I really would like to show my Pinterest images inline...

Google Drive links don't seem to work, either. Which cloud services are working with CL? Dropbox?
 
Top