How do i resize bmp images in codeigniter - codeigniter

I want to resize bmp images in codeigniter. How do i do that. Codeigniter image manipulation class resizes only images of type jpg,png and gif....Please help some one

Make sure you have the gd module installed for php. Then either extend the CI image manipulation class to work with bmp images or just resize them directly in the controller. Either way, you will need to familiarize yourself with the gd functions:
http://us.php.net/manual/en/book.image.php

Check out Timthumb, it's a much better solution to resize images than CI's built in functions, which are a little confusing.

Related

How to remove image resizing in Prestashop?

When uploading an image in Prestashop, my image is resized accordingly to settings. Can I remove the resize treatment and use native uploaded images in my website?
Images are resized in different size needed for different uses in Prestashop, so disabled fully this feature is not an good idea.
but to get the original image, you need to change path image in your file.tpl
https://example.com/img/p/{$id_product}/{$name_product}.jpg

Image Manipulator LARAVEL

I need a image manipulator for laravel but with only a few features:
Delete text from image (White Brush (?) )
Add text with a specific font.
Add other images in the image..
if is possible, a live view!
Any ideas of some package ?
Check out most popular image manipulation package Intervention Image.
Intervention Image is an open source PHP image handling and
manipulation library. It provides an easier and expressive way to
create, edit, and compose images and supports currently the two most
common image processing libraries GD Library and Imagick.
You can insert images into main image with insert() method, add custom text to image with text() method etc.

Render 3d .obj file to .png image

Is there at least some way to get a picture of a .obj model without displaying the model ?
I have a lot of .obj models and I need to convert them to .png images.
I need only image without display anything
You don't really need libgdx for obj rendering. This can be done by either opengl, or some custom render libs.
Consider using this library written in c++ for obj rendering. Here's its description in russian
Do you need to do this in libgdx? I think you can also call blender via command line, let it render the scene and output to an image. Make a short bash script to do this for all .obj files in your folder.
If you do need to use libgdx, I think a good approach is to render to a framebuffer, then write its contents to a file.

Creating thumbnail images for social network site using Laravel

I'm wondering if anyone knows a good strategy for solving this problem:
I'm creating a social networking site using Laravel 4. Users can upload pictures to their own gallery. These pictures can be any shape and size but the gallery on their profile will only display a cropped and resized thumbnail of the image (200px x 200px), which you can click on to view the full image.
Im using the Laravel plugin Intervention right now, which saves the original image, then resizes and crops that image and saves it again ( so now I have 2 copies). I then display the cropped/resized image as the thumbnail that links to the full size original image. However, I find that making copies of every image will be a tedious waste of space on my server since there could be thousands of images uploaded to the site.
Is there a way to grab the original image, resize and crop it on the fly and display it only when the user loads the page without having to save the thumbnail to the server? or am I stuck with having to make a cropped copy for every image?
A great example that shows what I'm looking to achieve is the way Facebook crops pictures into squares in a users picture gallery or how they are cropped and resized on the newsfeed when a user uploads multiple images to a status.
Any advice is greatly appreciated!
Have you seen League/Glide yet? It's basically a wrapper for Intervention/Image and Intervention/ImageCache. Glide's Laravel setup video gets you set up in two minutes (pay attention to the second example).
Yes Intervention let's you manipulate and display on the fly too.
Here's a simple example (obviously you would actually do it with a controller etc)
Route::get('img/profile/picture.jpg', function(){
$img = Image::make('path/to/profile/picture.jpg');
// resize, crop, whatever
return $img->response();
});
And then you just set the right URI to this route as src of your image.
Intervention Docs
Keep in mind that this will use more server resources and make the image response take longer

What image format is fastest for BlackBerry?

I'm trying to load some images using Bitmap.getBitmapResource(), but it takes about 2 or 3 seconds per image to load. I'm testing on the Storm, specifically. The odd thing is, when I install OS 5.0, the loading goes in a snap, no delay at all.
Should I be looking at the format used? Or where the files are stored? I've tried both 24- and 8-bit PNGs, with transparency. The files are stored in a subdirectory in the COD, so getBitmapResource is passed a path, like "images/img1.png" instead of just "img1.png".
Is any of this making things slower?
If you're looking for the most efficient format for storing image data within your application binary, the recommendation is PNG with the 565 colorspace. The BlackBerry Theme Studio toolkit has the ability to load any PNG and export it in this format. Its the best one because its what the BlackBerry uses internally.
Try to use EncodedImage, see Is it better to use Bitmap or EncodedImage in BlackBerry?
In case you need Bitmap class, try also bmp (don't forget to turn off "convert image files to .png" option in BB project settings)

Resources