Crop in cjuidialog - yii

I need to do an upload with crop picture but I can not find information to operate the extension eajaxupload, coconut inside cjuidialog
any extension for yii?
something like:
http://uvumitools.com/crop.html
http://kroppr.rborn.info/index.php

yes sure there is a yii extension, you can use http://www.yiiframework.com/extension/image which is a wrapper of the Kohana Image Module.The available image manipulation methods are resize, crop, sharpen, quality and rotate or flip.
However you can also find standalone php libraries like http://wideimage.sourceforge.net/ which works well with yii

Related

Dynamic User Interface in iOS

Im struggling with a thought here. Let's say a user has his own CMS where he can fill the content for our app. One of his options is to create a view by uploading images and typing text. Well keep it very simple and imagine he only uploads a image (320 x 20) and some text. So an image on top and some textlines below.
What would be the best way to let my app know of this layout and download the contents? I was thinking of a downloadable XML file which defines the layout but don't really know how to implement this or if its even the best way.
Oh and the content and layout must be downloadable for offline use too.
Another option what I was thinking of is showing the layout in a webview but I can't figure out how to download the mobile website for offline use.
A push in the right direction would be appreciated!
We use a custom XML and it is working good. All texts inside 'label tags' are in XHTML
remember to:
be specific when defining the xml to save some effort
write a limiting XSD! So nothing 'surprising' creeps into the xml
remember not include everything in ONE xml file as that would get rather large rather quickly. Choose a scheme for portioning the XML

Fine Uploader: resizing large files before upload?

I'm evaluating Fine Uploader compared to various other options, specifically JQuery File Upload.
I generally prefer the Fine Uploader approach as it's more lightweight, compared to JQuery File Uploader which has dependencies on Bootstrap and JQuery UI.
However it's important to be able to resize images: e.g., a user may select a large file from their camera and this may be very large - uploading the full resolution photo may take a very long time. JQuery File Upload doe this.
Additionally we don't have much use for very high resolution files.
If possible (I'm aware some browsers may not support this), I'd like to be able to resize images client size.
Is this possible?
Fine Uploader does not currently have any native support for image manipulation. This is a feature in our backlog, but we have not had many users tell us they are interested in this. This is one of the reasons why such a feature has yet to be implemented natively. There is a case, #707 that marks the start of native image-editing support for Fine Uploader. It is tentatively scheduled for 4.0.
However, you can certainly make use of FileReader and Canvas to resize the image. You can then submit this resized image as a Blob to Fine Uploader via the addFiles API method. At that point, the file has been submitted and Fine Uploader is ready to upload the item.
Essentially, the steps you would follow to handle this specific scenario, before Fine Uploader natively supports image manipulation:
Provide your own file input element(s) or make use of Fine Uploader's file/folder drag and drop support to get a handle on some files selected by the user.
Use FileReader to read the contents of the image.
FileReader will provide you with a URL for the image, assign that to the src attribute of an img element.
Draw the img onto a canvas element. This is where the resizing occurs.
Grab the URL of the resized image from the canvas element (canvas.toDataURL(...)).
Convert the URL to a Blob.
Pass the Blob to the addFiles API method of Fine Uploader.
The intent is to take care of most if not all of this for integrators such as yourself in the future by adding native image manipulation support to Fine Uploader.
Hope this helps.

3D animation programatically rendered in Blender

I have a project in which I would like to programatically create and render a 3d animation based upon input. I originally asked here on stackoverflow if Blender was right for the job, and the response was yes, but upon looking at the API, it says this:
Python was embedded in Blender, so to access BPython modules you need to run scripts from the program itself: you can't import the Blender module into an external Python interpreter.
I want to be able to create and render this scene without having to ever open another program like Blender. Is this possible, and is Blender still the right choice?
Thanks in advance!
At work me and colleague worked on a project that rendered 3d scenes altered externally. We used Python to modify/create scenes, and did the rending on server through the command line interface (no GUI).
You can pass a python script as an argument to Blender in the command line options to
generate your scene objects and do the rendering.
I don't see how you can render in Blender without using Blender.
You can use Blender if you want, obviously this is not your only option.
If you need to
create and render a 3d animation based upon input.
You can go as simple or as you complex as you'd like.
You can use OpenGL in your language of choice (C++, Java, Python, etc.)
and display the animation (with or without fancy renderings).
It's up to what 'render' means to your context.
If you need some nice shading(light, soft shadows, reflections, etc. - ray tracers basically), you can still show an interactive preview to your users and generate the scene
for a 3rd party renderer(like Yafaray, Sunflow, LuxRender, etc. - I've put together a short list of free renders), and show the progress to the users after they've chosen the external render option.
On a similar note, have a look at joons.
HTH
Cart by Suomi - Yafaray Gallery image
Julia quaternion fractal - Sunflow Gallery image
Klein Bottle - LuxRender Gallery image

QuickLook plugin displaying an image and some infos

I'm currently writing a QuickLook plugin, and I wondering how I can display an image and some information about that image at the same time, similar to http://www.code-line.com/software/sneakpeekphoto/ .
There is only one way to do so: Convert your content to an already supported one. This means either PDF or HTML. There are two options you have:
For static information you create a simple PDF preview by rendering a view into a PDF. (Use -dataWithPDFInsideRect: method of NSView)
For dynamic information create a HTML page with links and so on. QuickLook will then show it. (I think this is also the way your example does it.)
We have not found a way to create complex previews on ur own and had to stick to one of the methods, too. Keynote and Pages do the same -- they convert their presentations to multi-page PDF previews...

PDF Thumbnail display

How to display PDF thumbnails in ASP page
There is no built in functionality for ASP to process and manipulate PDF files. You will need to install a custom component on your server, make sure your webhost allows this, or ask them for a list of installed objects as they often have ones that will do what you want.
A good free on is GFlax:
http://download.cnet.com/GFLAx/3000-10248_4-10327603.html
It will allow you to chop a PDF up into seperate JPEG files, and from there you can get the object to resize the JPEGs into different thumbnail sizes for your needs.
The GFlax documentation should get you started.
Have you looked at this? Mapsoft ThumbNails
you can use Ghost script sharp for displaying pdf thumbnail . Here is the code
GhostscriptWrapper.GeneratePageThumb(filepath, thumbnailPath, 1, 20, 20);