Ability to sort order jssor thumbnails - jssor

I am using the http://www.jssor.com/ image gallery without jquery
I am finding even though I've sequentially numbered each image in the directory ie; 01.jpg, 02.jpg etc.. and the same for thumbnails ie 01_tn.jpg, 02_tn.jpg etc.. it seems to be picking up the images in some random order.
My desire is the images number dictate what order the thumbnails are put in.
Is there a solution to sorting the thumnails ? I am using the http://www.jssor.com/demos/image-gallery-with-vertical-thumbnail.html
What sayeth the group ?
Jay
CompuMatter

Thumbnails are in in the same order as slides. And thumbnails are in a loop.
If you set $Loop to 0 for $ThumbnailNavigatorOptions, you will see the order clearly.

Related

Slack Thumbnail url from Slack api for any file type like Image, Pdf, Audio, Video etc

I need to extract thumbnail url for any particular file.
while accessing the https://slack.com/api/files.list
I saw that for image thumbnail key asfiles : thumb_64, thumb_80, 360 type JSON keys
For pdf it is like
& similarly for other file type it has different different json key to find thumbnail.
So for every particular file type should i find thumbnail key manually. Any shortcut to find thumbnail key for all file type.
I need to pass my thumbnail url to some service no matter what kind of file it is.
Thanks!
The documentation for the file object type gives some information on this. But as you have already noticed, it doesn't mention PDF or other file types.
If a thumbnail is available for the file, the URL to a 64x64 pixel
will be returned as the thumb_64 prop.
The thumb_80 prop (when present) contains the URL of an 80x80 thumb.
Unlike the 64px thumb, this size is guaranteed to be 80x80, even when
the source image was smaller (it's padded with transparent pixels).
A variable sized thumb will be returned as thumb_360, with its longest
size no bigger than 360 (although it might be smaller depending on the
source size). Dimensions for this thumb are returned in thumb_360_w
and thumb_360_h.
In the case where the original image was an animated gif with
dimensions greater than 360 pixels, we also created an animated
thumbnail and pass it as thumb_360_gif.
Depending on the original file's size, you may even find a thumb_480,
thumb_720, thumb_960, or thumb_1024 property.
I did try looking through the Slack client's JS code (search for thumb_pdf in client-boot-imports.XXXX.min.js), and found a code block where it seems to be defining possible thumb_* keys. While it is not conclusive, you may look for these fields in the API response and fallback to a default image for each supported format.

iTextSharp: change the order of objects in existing PDF

I'm dealing with a corporate report generating system that generates documents with stamps and signatures.
The sad thing is that the system is not able to place images below existing text and tables, so the jpg-stamps overlapping text look really odd and unrealistic. The system does not support images with transparency channel either.
I'm trying to fix things by first printing reports to PDF and then manipulating images sending all them to back (below text and other vector content) using iTextSharp. Finally the results are sent to a hardware printer.
All the images are stored in resources (XObjects).
The problem is that I have no idea how to manipulate PDF-objects z-order (creation order) with iTextSharp.
The current version (a c# COM-object/assembly) works as follows:
Build the list of references to existing images (reference, image bytes, image CTM) in a page loop with parser.ProcessContent()
Execute KillIndirect() on any reference found
Replace them with writer.AddDirectImageSimple() and blank image (with transparent mask)
Insert previously stored image bytes as images (taking CTM into account) with stamper, in GetUnderContent mode.
I wonder if is there a more simple solution without blank images, excess references etc.

Get larger (non-thumbnail) image for Facebook Graph Link object

Is there a way to get larger, non-thumbnail image for a link object? For example, given the link object https://graph.facebook.com/344600782244586, how can I get something larger than the thumbnail?
https://graph.facebook.com/344600782244586/picture does not work. It gives me the error "No node specified". Which means I can't use the type parameter.
The link object has a picture property with a value of http://external.ak.fbcdn.net/safe_image.php?d=AQAjeHBmdhzmBYB7&w=90&h=90&url=http%3A%2F%2Ftctechcrunch2011.files.wordpress.com%2F2012%2F03%2Fgf.jpg%3Fw%3D150. That will give me the thumbnail. I've tried just playing with the w and h values, but then Facebook just returns a 1x1 GIF.
My current approach is to pull out the url parameter and use that, but I'm wondering if there is a FB approach I can use.
seems there is a new "full_picture" field to ask for:
/posts?fields=full_picture
note that it's still not referenced, so I don't know if it's working at 100% and seems to be great for links but not pictures.
I personally combines 2 solutions:
if link I use full_picture field
<img src="[full_picture]" />
if picture (after asking for object_id field /posts?fields=object_id ) simply:
<img src="https://graph.facebook.com/[object_id]/picture" />
I kind of found a hack way to get the larger pic. If your image url ends in "_s.jpg", just replace the "_s" with "_b" and voila. Its a hack, that may not work tomorrow, but for now, it
does.
See below:
Small pic vs Big Pic
From the graph api
https://developers.facebook.com/docs/reference/api/
You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height): https://graph.facebook.com/[INSERT ID HERE]/picture?type=large.

Perl/CGI : format several images

Need a bit more help please...
I need to display 24 times :
or
or
(depending on speed/duplex on the port)
But those images have to be displayed in the switch's image :
How to do to get all images well formated ??
To know which color to choose, I wrote a perl script using Net::SNMP to get infos about speed, duplex...
Thanks guys.
Bye
Hm. Actually, I'd be more tempted to take the images and use CSS styles to color them.
For example, if you took one of those and turned the colored areas transparent, you could place them using CSS, and change the background color, either with generated Perl or with JavaScript on the fly.
It gets a little complex, admittedly; you'll have to create 26 styles (one for each switch), placing them appropriately. You'll need two images (right-side up and upside-down). You'd also have
.yellow { background-color: yellow; }
and so on. But then it's just a matter of adding the appropriate class to the appropriate div; no need to load six different image variants (just two), and you gain the ability to adjust the colors to be anything you want with just a change to the CSS, and do so dynamically if you like.
Does that make any sense?
PerlMagick

iphone uiimage tag - can you use strings?

quick question...
I have a series of buttons, each with a tag. I click the buttons which individually create a uiimageview based on the tag number. So this tag number, say 43 is passed and a new uiimageview is created using 43.png
All this is working nicely and I can remove the created images by clicking on them...
..but... I'm now wondering how I can remove all these created images all at once. So I have say 4 images which were all created as a result of clicking the buttons.
my question is this: can I use a string to identify these "created" images some how? I thought about using a tag for them starting with 99 maybe? so 991, 992, 993 etc. but this doesn't seem like good coding. In the past, and indeed in Flash, I used a tag of item1, item2... then in the code, I simply loop through ALL tags on the screen starting with "item" and remove them.
any ideas on the best way to tackle this??
Thanks
You could simply store a reference to all the created images as elements in an array kept as an attribute of the viewController.
Alternatively, this is the sort of problem that can be handled with a subclass. You can just create a subclass of UIImage with some sort of identifier attribute and use that to remove them.
Seems like you could just loop through the subviews array, look at the tag property of each one, convert each to a string, and use NSString startsWith: to remove those that match your pattern.
But I think it would be easier to just keep your own list of created images, and delete them when desired.