Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Display a local / remote image in a note (Read 1061 times)
B.Moreira
Full Member
*
Offline



Posts: 71

Display a local / remote image in a note
Oct 22nd, 2015, 5:58am
 
Dear all,
been trying to work with images, but had no luck yet doing this (don't know if it's possible).

I wanted to insert some heavy images in the TBX document (+- 2/3MB image, like, 100 images  Cheesy )

I can drag them but it would be overkill for the file. I can link them in the $URL of $File but that would be just that a link.

Is the best of both worlds possible? Like storing the remote/local path to the image in the $URL/$File and making the note display the linked image im map view (displayexpression?) is this possible at this time? It would be great!

If not possible ... any viable alternative for this?

Thanks.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Display a local / remote image in a note
Reply #1 - Oct 22nd, 2015, 7:24am
 
This idea has been raised before - displaying linked images files (if only to avoid TBX file size bloat). However, as things stand the main method is drag-drop, into note $Text or onto map backgrounds. I suspect my aTbRef notes are a little out of date - it's difficult as this are changes over time and isn't heavily documented.

Not tried, but you could use an image as a custom $Fill though the image needs to be in the app support's 'fill' sub-folder to work plus you may need to re-size.

If you add 100 x 3MB image to your TBX it will grow a fair amount in size.  If you add all those images to one map as image adornments I suspect TB may wheeze a bit moving the map as you've 300MB of picture data added to the mix. I'm not saying don't do it, but just be aware you're pushing the (likely) design envelope a bit.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
B.Moreira
Full Member
*
Offline



Posts: 71

Re: Display a local / remote image in a note
Reply #2 - Oct 23rd, 2015, 4:42am
 
Thank you Mark! I can work with the $Fill. I did the following:

1) in my project folder, I created a sub-folder to hold the originals of the images that will appear in TBX as note fills - for ex. "proj_001";

2) placed some images on it "img_01, img_02 ...";

2) in the TBX application support / Fill directory, I created a symlink to the originals folder;

3) in the TBX file, in the note's $Fill, I can insert "proj_001/img_01" and the image will appear! (need to be careful with resizing / proportions as you have said).

In this way, I can:

have all the images outside TBX support file folder;
have all the images inside a dedicated sub-folder inside my main folder of the project I am working on;
have the images organized by project, having as many projects as I want;
have TBX display these images without the bloat in the TBX file (altough not a problem for BBEdit Wink )

Now if only I could find a way to force proportionality in the fill!
Thanks!

Back to top
 
« Last Edit: Oct 23rd, 2015, 4:43am by B.Moreira »  
  IP Logged
B.Moreira
Full Member
*
Offline



Posts: 71

Re: Display a local / remote image in a note
Reply #3 - Jun 8th, 2016, 7:22am
 
And now I think I did something to that proportionality!

by applying a $Rule like this:

Code:
$Width=runCommand("sips -g pixelWidth partial_path_to_file" + $Fill + ".jpg").substr(-4);
$Width=$Width/$Factor;
$Height=runCommand("sips -g pixelHeight partial_path_to_file" + $Fill +".jpg").substr(-4);
$Height =$Height/$Factor; 



the note, when selected, uses a terminal command to determine the $Fill image's width and height, applies a $Factor (which is a Key Attribute of the note) to divide those dimensions, and applies the result to the note's $Width and $Height!

Result: I now only need to give Tinderbox the path to the $Fill, and the note will automatically adjust it's width and height, becoming proportional, allowing for fine tuning via the $Factor key attribute.

So far my experience with Tinderbox can be resumed into this:
Cheesy Grin Shocked Shocked Grin Cheesy Angry Shocked Cheesy Cheesy Grin Cheesy
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print