dotCMS: photogallery - Error creating thumbnail - photo-gallery

I try to launch a photogallery in dotCMS 2.1. But I can't see the thumbnails and photos. I tried two ways:
1) using a macro
#photoGallery('/img/gallery/clenove')
I don't see the thumbnails in this case. If i click on a photo, it occurs only if I am logged in as an Admin (Although i checked the user rights).
The tomcat log follows:
[25/09/12 10:56:54:577 CEST] ERROR image.ThumbnailImage: Error creating thumbnail from servlet: Can't find contentlet: c829ebd1-4719-491d-b915-ea2c8bc1f476 lang:1 live:false
com.dotmarketing.portlets.contentlet.business.DotContentletStateException: Can't find contentlet: c829ebd1-4719-491d-b915-ea2c8bc1f476 lang:1 live:false
at com.dotmarketing.exception.DotRuntimeException.fillInStackTrace(DotRuntimeException.java:33)
at ..
2) via Content -> Image Gallery -> Add New Content
this displays the message: "There currently no images in the folder." But in the administratiion, I can see them.

Are you sure you published the images?

Related

ROS: Display sensor_msgs/Image image form a custom topic

I have a problem with debugging my ROS code. I can't display an image to verify proper tracking.
Is there an easy way to display images from a custom message using a terminal, or do I have to write a new node that will display the image?
My message:
std_msgs/Header header
uint64[] object_ids
uint16[] class_ids
float32[] confs
int16[] x_coords
int16[] y_coords
int16[] bb_width
int16[] bb_hight
sensor_msgs/Image source_image
I want to display source_image coming from a topic /tracker_topic.
I tried using topic_tools relay_field, but I'm using python 3 which doesn't use Unicode, and I'm getting errors because of that.

Error retrieving image from URL or bad URL with webContentLink

My application is trying to insert a bunch of images to google drive sheet using google app script.
The script method is calling from a Rails app as following:
#app_script.run_script(script_id, request)
The script method is trying to fetch the image through the id and insert it to the sheet.
var srcfile = DriveApp.getFileById(object.image_file_id);
srcfile.setSharing(DriveApp.Access.ANYONE_WITH_LINK, DriveApp.Permission.VIEW);
var image = SpreadsheetApp.openById(object.spreadsheet_id).getSheetByName(object.sheet_name).insertImage(Drive.Files.get(srcfile.getId()).webContentLink, object.column, object.row);
The problem is coming intermittently with the response error from google script:
Exception: Error retrieving image from URL or bad URL: https://drive.google.com/uc?id=1yZULGInEcjQ_nA4j_Nmy6F2e3JcYnLFP&export=download
Note that I can download the image successful if I just copy the link and paste it to browser.
The image file and its parent folder are public share.
It seem hard to detect the problem when it does not always happen.
For those who concern about my script, it is here
Exception: Error retrieving image from URL or bad URL
This is a common error message when the image size is too big.
See here for more information.
You need to recuce the image size - either manually or programmatically - before inserting.
UPDATE
If the suggestion above does not solve your issue, implement the following workaround:
Instead of inserting the image by its webContentLink with the method insertImage(url, column, row) , use the method insertImage(blobSource, column, row):
var image = SpreadsheetApp.SpreadsheetApp.openById(object.spreadsheet_id).getSheetByName(object.sheet_name).insertImage(DriveApp.getFileById(srcfile.getId()).getBlob(), object.column, object.row);
This should solve the issue.

SKTexture: Error loading image resource

This seems to work perfectly fine:
and when I created a new project with exactly the same thing, just new images, it doesn't work:
I even tried
var mainChartxt = SKTexture(imageNamed: "mainC.png")
and it still gives me the same error:
SKTexture: Error loading image resource: "img/mainC.png"
I tried cleaning the project and deleting the derived data folder and still no luck as the image doesn't show up on the app!
Thanks.
Where / How did you add the image in your project ?
The second syntax (without the path) should be ok. You don't even have to specify .png if that's the file format (but you need to if it something else : .jpg, .jpeg, ...
You might want to check that your asset is "checked" for the target membership. On the right side (Utilities) > File Inspector > Target Membership : check your target (not the tests one if you don't have any tests).
A similar error occurred to me while following a tutorial to develop a game using spritekit.
Error was "SKTexture: Error loading image resource:"imagename""
In my case the path was not set properly.
We can recheck to be sure that the path is always set correctly.

nicEdit Uploading Locally - Issues with nicUpload

If anyone has managed to get locally uploading images I'd be mightily appreciative of some help.
I've downloaded the latest version of nicEdit along with the nicUpload plug in (from nicedit.com - Version 0.9 r24 released June 7th, 2012).
I've also downloaded nicUpload.php from http://svn.nicedit.com//trunk/nicUpload/php/nicUpload.php
NicUpload.php - I've set NICUPLOAD_PATH and NICUPLOAD_URI both to 'images' which is the subfolder of where nicupload.php and nicEdit.js are located.
NicEdit.js - I've added the following to line 271:-
uploadURI : 'nicUpload.php?id=123',
I've given it an ID otherwise it was failing with an invalid ID code. But the ?id=123 isn't meant to be there. I've also set the iconsPath accordingly.
Line 1370 I've switched this:-
nicURI : 'http://api.imgur.com/2/upload.json',
for this:-
nicURI : 'http://www.mydomain.com/nicedit/nicUpload.php',
But I'm still getting "Failed to upload image". I've searched and searched and searched for answers to this and I'm getting close to having spent two days tinkering with it.
With a few debugging displays I can see that it's failing on line 46 of nicUpload.php where it says:-
$file = $_FILES['nicImage'];
$image = $file['tmp_name'];
$max_upload_size = ini_max_upload_size();
if(!$file) {...
That last IF is true and that's where it exits with the error.
Appreciate anyone being able to help.
The nicUpload.php script file laying around sucks and I don't even understand how it could work.
NicEditor uses imgur as the default image upload service. The source code follows the API format described here: http://api.imgur.com/resources_anon#upload
My suggestion would be to implement the API request and response defined there.
I did not use the niceedit upload function to do what you want. I managed to add a button to the link and img dropdown menu. The button opens a file manager window where you also can upload. I managed to put then de url of the image or document into the nicedit drop down img or url window. That is how I solved the problem.

How to get all files from Gallery without using s3eImagePicker in Marmalade?

I have requirement to get all files from Gallery and show thumbnail of actual image file in Grid Layout for selection. In this case I cannot use s3eImagePicker as it opens Gallery application in which I cannot add my button. Basically my application requirement is show all images in Gallery to user in thumbnail form. When user select any thumbnail and press UpLoad button I need to copy actual image from Gallery to application folder selected by user. So my UI contains Grid Layout for thumbnail,List of Target Folders and two buttons i.e Cancel and Upload. This kind of UI is not possible with s3eImagePicket. So I am searching for other solution which can give path info of all files in Gallery.
Please note that I am developing application for iPad and Android.
Marmalade Team Member: Can you pls reply on this? For Contact I can read from device without using Default Contact application, but it is not possible for Gallery. Can you please raise this as new feature if posisble and if there is no solution exist for this?
In marmalade if you are searching for the path of all files in a directory (e.g. a gallery directory), here is one way to get that:
std::string strDirectory = "[GALLERY PATH HERE]";
s3eFileList *pFileList = s3eFileListDirectory( strDirectory.c_str() );
if( pFileList == NULL )
{
return;
}
char pFileName[255];
int32 iFileNameLen( 255 );
while( s3eFileListNext( pFileList,
pFileName,
iFileNameLen ) == S3E_RESULT_SUCCESS )
{
s3eDeviceYield(); // use this yield if there are potentially many files
std::string strImagePath = strDirectory + pFileName;
...
do whatever you want now with your paths for files in gallery
...
}
s3eFileListClose( pFileList );

Resources