Car Photos?

52 views
Skip to first unread message

Michael Anteau

unread,
Sep 4, 2015, 1:54:36 PM9/4/15
to SwitchList
I do have a suggestion for a Switchlist enhancement.  Some of my operators have visual challenges.  They currently use car card systems where each car card has a color photo of the car in question.  That makes it easy to find and work the car, when reading small numbers on the car sides would be challenging.
It would be nice to have a photo field in the car record that would accommodate a .jpg image of the car.  Then it would be nice to have a report style that would include a car image thumbnail for each car routed.  It wouldn't be very prototypical, and it would make the switchlists longer, but it would really help some of my operators.

Michael

Michael Anteau

unread,
Feb 4, 2018, 8:40:45 PM2/4/18
to SwitchList
Hi Robert,
I've been working some more on a switchlist that would show photos.  You can see my progress below.  I've managed to create a custom switchlist that shows a photo when opened in Microsoft Word:


The HTML source I used to produce this is:
<img src=file:///Users/anteaum/CarPhotos/CO362BE.JPG height=40 width=80>

However, when I view this in Switchlist, only empty boxes appear, instead of the image.  it looks like the following:

Do you have any suggestions what to try next?  It appears the issue may be one of security?  As additional information, when I try the custom Thomas switchlist, I have the same problem with the train image from the web.  It shows up as a box with a question mark.  In that case, the HTML is trying to load the image from the web.  I checked the website, and the image is still available.


I tried putting the photo in the Switchlist directory, but that broke the whole HTML page.  I think it was because of spaces in the folder path being rendered as %20.  At any rate, it did not work.


I feel I'm close, but I just don't know how to get that image to display in the app.  Any ideas?


Thanks!


Michael

Robert Bowdidge

unread,
Feb 5, 2018, 2:59:13 AM2/5/18
to switc...@googlegroups.com
Hi, Michael,

Wow - glad you're working on this; I'll be interested to hear what works for the photos - what size, how much detail, etc. I was operating on an N scale layout last week, and I started appreciating the need for photos and colors.

Try putting the car photos in the same directory as the switchlist.html file, and referencing the files with a relative path - no HTTP or FILE or anything:
<img src="CO362BE.JPG">

The <img src="file://" always says look on the local machine for the file which isn't quite what you want - you want SwitchList providing that file from its web server.

As you suspected, Switchlist allows loading arbitrary files but only from the same directory as the switchlist.html file. I did that so that there was no chance that SwitchList web server could be a back door for reading any files. It's really unlikely that could happen, but it's just natural to be worried about security when creating things that look like web servers.

Let me know if the suggestion works, otherwise I'll experiment and figure out exactly what's allowed.

Robert

Michael Anteau

unread,
Feb 5, 2018, 12:09:22 PM2/5/18
to switc...@googlegroups.com
Hi Robert,
Your suggestion worked!  Thanks.  The actual code has no double quotes.  

I chose to use only the car number, since I have & characters in my initials (C&O) and I like the way they display.  If I have duplicate car numbers, I'll just adjust them.  So my files are named like 4287.jpg
Here is the actual code I used:
<td><img src={{car.number}}.jpg height=50></td>

I reduced my photos to 5" width, about 50 K each.  The large photos I had (about 6MB) caused REALLY long print times.  With the smaller photos, the print looks the same but there is no print delay.  It's probably possible to go even smaller, but this works well.  A display height of 50 pixels seems good to me.  I'll have to check with my operators to see if they agree, but that would be easy to adjust.  ;)

Here's a sample, and I've attached the switchlist.html file.
Michael

Inline image 2



--
You received this message because you are subscribed to the Google Groups "SwitchList" group.
To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

switchlist.html

Robert Bowdidge

unread,
Feb 10, 2018, 7:02:56 PM2/10/18
to switc...@googlegroups.com
:-) Glad it worked, Michael! BTW, any idea about whether the photo of the full car side is needed, or if you could just do a portion of one end to get reporting marks and rough color?


Robert

> On Feb 5, 2018, at 9:09 AM, Michael Anteau <antea...@gmail.com> wrote:
>
> Hi Robert,
> Your suggestion worked! Thanks. The actual code has no double quotes.
>
> I chose to use only the car number, since I have & characters in my initials (C&O) and I like the way they display. If I have duplicate car numbers, I'll just adjust them. So my files are named like 4287.jpg
> Here is the actual code I used:
> <td><img src={{car.number}}.jpg height=50></td>
>
> I reduced my photos to 5" width, about 50 K each. The large photos I had (about 6MB) caused REALLY long print times. With the smaller photos, the print looks the same but there is no print delay. It's probably possible to go even smaller, but this works well. A display height of 50 pixels seems good to me. I'll have to check with my operators to see if they agree, but that would be easy to adjust. ;)
>
> Here's a sample, and I've attached the switchlist.html file.
> Michael
>
> <Switch_list_for_2__Nicholas_Local.jpg>
>
>
>
> On Mon, Feb 5, 2018 at 2:59 AM, Robert Bowdidge <rwbow...@gmail.com> wrote:
> Hi, Michael,
>
> Wow - glad you're working on this; I'll be interested to hear what works for the photos - what size, how much detail, etc. I was operating on an N scale layout last week, and I started appreciating the need for photos and colors.
>
> Try putting the car photos in the same directory as the switchlist.html file, and referencing the files with a relative path - no HTTP or FILE or anything:
> <img src="CO362BE.JPG">
>
> The <img src="file://" always says look on the local machine for the file which isn't quite what you want - you want SwitchList providing that file from its web server.
>
> As you suspected, Switchlist allows loading arbitrary files but only from the same directory as the switchlist.html file. I did that so that there was no chance that SwitchList web server could be a back door for reading any files. It's really unlikely that could happen, but it's just natural to be worried about security when creating things that look like web servers.
>
> Let me know if the suggestion works, otherwise I'll experiment and figure out exactly what's allowed.
>
> Robert
>
> > On Feb 4, 2018, at 5:40 PM, Michael Anteau <antea...@gmail.com> wrote:
> >
> > <img src=file:///Users/anteaum/CarPhotos/CO362BE.JPG height=40 width=80>
>
> --
> You received this message because you are subscribed to the Google Groups "SwitchList" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "SwitchList" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <switchlist.html>

Michael Anteau

unread,
Feb 10, 2018, 11:03:40 PM2/10/18
to switc...@googlegroups.com
Hi Robert
I did think of that, but haven’t had time to try it. All my photos are the full car. But I may try to crop them to see what happens. I’ll post a sample if I do.

Sent from my iPhone

Michael Anteau

unread,
Feb 13, 2018, 4:01:57 PM2/13/18
to switc...@googlegroups.com
Hi Robert,
Here's a sample of the photo switchlist with larger photos of just one end.  I think I prefer the photo of the entire car, since weathering , color, height, style (number of tank domes, etc.) all figure into quick recognition.  When I look at a string of cars, and the photos, they appear similar in size and easy to identify.  

With the larger photos, I get color but I have to read the reporting marks and that's actually harder than having them printed.  If there were a lot of similar cars, like boxcar red boxcars, this might be difficult.  Just my impression.

Inline image 1

>> To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+unsubscribe@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "SwitchList" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+unsubscribe@googlegroups.com.

>> For more options, visit https://groups.google.com/d/optout.
>> <switchlist.html>
>
> --
> You received this message because you are subscribed to the Google Groups "SwitchList" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to switchlist+unsubscribe@googlegroups.com.

Michael Anteau

unread,
Feb 14, 2018, 8:20:03 AM2/14/18
to switc...@googlegroups.com
Hi Robert,
I stand corrected.  I showed both reports to my operators, and they preferred the larger photos.  So I gave it a moment's thought and realized I don't have to choose.  I can just make a second style called NACLargePhotos, fill that one with the bigger images, and select whatever style the operator running that train prefers.  I love Switchlist!  What a fantastic program!!!
Thanks again!
Michael
Reply all
Reply to author
Forward
0 new messages