I get a ClassCastException when trying to animate a GifImage in BlackBerry. I tried many ways, but all cause that exception. I referred to the BlackBerry knowledgecenter article "Display An Animated GIF" and I tried the following code in my mainscreen. I also tried using #swati's code from the "Animated GIF" blog post. What is my mistake?
GIFEncodedImage bitmapImage=(GIFEncodedImage)GIFEncodedImage.getEncodedImageResource("CuteCapLa4.gif"); //**Getting Exception at this line**
AnimatedGIFField image_field=new AnimatedGIFField(bitmapImage);
add(image_field);
As described here:
rapc has option to convert image files to png format. However it keeps name and extension of original file. In this case you lose ability to animate as well as you get ClassCastException.
If you're using eclipse you could check this option in the Application Descriptor XML file under the "Build" submenu.
Related
I'm running my processingjs sketch locally and I'm trying to save a PNG of my canvas but I can't get the regular commands saveCanvas("image", 'jpg'); and save("diagonal.tif"); to work.
Does anyone have a tip on how to get this done?
Cheers,
Thales
Questions like these are best answered by looking in the reference.
Take a look at the documentation for save() and saveFrame(). I'm not sure where saveCanvas() is coming from, but I don't see it in the Processing.js reference. Are you thinking of P5.js?
Anyway, the documentation says:
These files are saved to the sketch's folder, which may be opened by selecting "Show sketch folder" from the "Sketch" menu.
This makes me suspicious that these were only designed to be used from the Processing editor.
Take a look in your developer tools to check the JavaScript console for errors. What do you see when you try to call the save() or saveFrame() functions?
I'd also recommend googling "processing.js save image" for a ton of results, including:
save image to a png file using processing.js
How to export an image or PDF from a Processing Javascript mode sketch?
Processing.JS save() help
If you still can't get it working, please link to a CodePen or JSFiddle with a simplified MCVE that demonstrates the problem.
I'm using CKEditor for my site.
Now I found the plugin called "MediaEmbed". I need it for embedding YouTube videos.
I installed it and the integration worked fine, but embedding won't work.
When you paste the code into the text area in the embedding dialog and then click on OK in IE and Chrome nothing happens and in Firefox it just adds a image as a flash-content-placeholder.
Let's say the flash-content-placeholder image would be just in the wysiwyg interface, but then i should get the embed code when I click on "view source" - but no, there you just see the source of the placeholder image div and img tag.
Then let's say the embed code is saved internally, so I save the file I create with CKEditor, and the out I get is just what I entered without the stuff the MediaEmbed plugin has generated at all.
How to fix this?
Please help!
Yours Joern.
use firebug and see, it'll be giving a cross domain error. the plugin has a bug. use try catch in the place where is accesses the windows.name property for a workaround.
Try istead ckeditor youtube plugin
I am using fckEditor as text editor. When i upload images thru it the images were uploaded to app/webroot/fckeditor/images.
And when they're embedded it looks like
/fckfiles/SalmonSashimi.jpg
Until now it looks right.
But the image doesn't appear.
So when I browse the image directly, at here
http://www.in-culture.info/fckfiles/SalmonSashimi.jpg
instead of displaying the URL, Cake interrupts the image call and trying to render it in a layout. I often face this error when I point .html file for iframe scroller and .xml file for flash embedding. This is really embarrassing
You can see the page here
http://www.in-culture.info/events/view/42
That image should appear before the text - "More" dont appear for short text.
Thanks for you help.
Try to change the path where the images are saved. Instead of
/app/webroot/fckeditor/images
try to change to
/app/webroot/img/fckeditor/
I believe that it's possible.
It's resolved now.
It was not cake's fault.
I pointed incomplete absolute path at FckEditor so it didn't upload the files well.
However the uploader mistakenly passes the "OK" so the HTML tries to display it.
So cake tries to render something, as usual, when there is no physical file.
I spent about 10 hours to resolve this.
Now I don't hate cake as I did a few hours ago. (: :)
I'm working with Flowplayer captions plugin http://flowplayer.org/demos/plugins/flash/captions.html and I need references/links in subtitles. When I've built into srt file link like click this link to flowplayer.org
then the flowplayer stuck on parse processing and last message was only
org.flowplayer.captions::Caption : captions file loaded, parsing cuepoints
Please prompt me how to resolve this problem. Thanks
I've resolved this problem by commented out some piece of code in source code. This code checks for XML subtitle format and fails when it reads linked html code.
I have almost 20 images in PNG format added to my current project on Xcode (under the proper group, Resources). Unfortunately, library window's Media tab doesn't show some of them. And if I create an UIImageView and set one of these invisible images from code, nothing shows up. I also tried from IB with adding a UIImageView and set its source image.
Is this problem a image format related issue or is there a tiny detail I'm missing.
What log says:
Could not load the "07_clock_icon.png" image referenced from a nib in the bundle
The solution to this is a bit silly, but it definitely works:
Close XCode and the Interface Builder. Now, instead of opening XCode then opening the project, navigate to the project in Finder and double click on the project. When you open your xib file the blue file not found images will flash up, then be replaced with the correct images and the dropdown will show all your images in the Inspector.
Heyy! I figured it out. It's a refreshing bug. So just copy and replace those images that did not load into your project folder, and then hold Shift Command K (to clean your project). After Clean Up it should work perfectly! Enjoy!
If you dragged the images from the Finder into the Resources folder in XCode the images should show up in IB as well. At least it does so in my setup.
Maybe the images are 8-bit PNG images. I believe Cocoa requires them to be 24-bit because of the alpha transparency. PNG 8-bit doesn't support the alpha channel, as it's more like a GIF image.
But from the error you posted It seems IB couldn't find the resource at all. Which is understandable if it doesn't load the resources from XCode in its library.
Assuming you selected the option to let XCode copy the files into your project and neither XCode nor the Finder complain when you make the copy... I wonder if there might be some file corruption? Maybe try recreating them or opening and resaving them from another graphics application (or even Preview.app).
btw- 8-bit PNGs have worked fine for me.
Same problem was encountered by me. The problem is with the image. The image has been some how corrupted.Try to open the image in photoshop and you will see it doesn't open with photoshop.
I solved the problem by changing the image format to PNG-24 and everything works fine for me.
Hope this will solve your issue.
Regards,
Rupesh R Menon