Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Creating an image file from base64 text

images php coding issues or problems here.

Moderators: macek, egami, gesf

Creating an image file from base64 text

Postby iJim » Sun Dec 09, 2012 3:07 am

Hi to everybody,
[excuse me for my english!!!]
I have an image stored in database (MySQL), in base64 text format, when i write this code:
Code: Select all
$imgData = str_replace(" ","+",$imgText);
echo '<img src="'.$imgData.'">';

It work.

But i want create an image file..
I try this, but it doesn't work
Code: Select all
header(‘Content-type: image/png’);
echo base64_decode($imgData);
iJim
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun Dec 09, 2012 2:59 am

Re: Creating an image file from base64 text

Postby kiash001 » Tue Mar 05, 2013 9:08 am

I think the problem is
Code: Select all
data:image/jpeg;base64,

Solution is
Code: Select all
base64_decode(str_replace("data:image/jpeg;base64,", '', $data));
User avatar
kiash001
New php-forum User
New php-forum User
 
Posts: 16
Joined: Wed Feb 27, 2013 2:49 am
Location: Dhaka, Bangladesh

Re: Creating an image file from base64 text

Postby iJim » Tue Mar 05, 2013 9:33 am

Thank you
iJim
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun Dec 09, 2012 2:59 am

cheapest Herve Leger on sale (15)

Postby griffis99 » Tue May 14, 2013 6:40 am

First of all, what good does tree pruning trimming and shaping do for my trees? Secondly, why do it in the winter months? Trimming a tree or pruning is necessary for many reasons. An important reason to prune a tree is to lessen the chance of it falling during a wind or ice storm. Thinning a large tree canopy is a great way to reduce wind resistance. Once pruned, air can now breeze with ease through the top of a tree requiring much less stabilization and pressure on the root system. Tree maintenance is also appealing to the eye like grass cutting. Cutting dead limbs helps prevent the spread of disease or bacteria, and avoids potential hazards. There are many benefits to trimming, shaping, & pruning a tree.
So why is pruning a tree in the winter so effective? There are many reasons. I will point out a few important ones.
It is Cheaper! Most tree cutting service prices are low in the winter months since this is a slow period. Local tree service herve leger for sale cost is very competitive during this season.
It is cold outside. Trees go to sleep (dormant) in the winter much like our beloved Bear! Vascular cambium is slow; the tree relies on its reserves for nourishment, and does not use a lot of energy. So why does this help for cutting a limb? For some species it?s very important because sap flow is not heavy and the tree will not bleed.
Leaves are gone. Deciduous as opposed to Evergreen trees leaves have fallen, therefore the debris is much less when trimming your trees. Cleanup and chipping the tree debris becomes much easier.
So how do tree trimming & tree cutting services determine a dead branch versus a live branch without leaves? An experienced tree climber can tell the difference. This is a picture of a Red Maple (Acer rubrum) tree limb, one dead and one alive. The dead limb is a bit discolored, cracked, and dried out. The live limb has a healthier more rich color tone, together, and flexible. You can also see that the new growth is much more abundant than the dead limb. The texture of the dead limb is very rough while the texture of the live limb is smooth. If you try to break the dead limb, it?s easy to snap apart. Whereas if you try to break the live limb, it?s more difficult and will rip cut or tear by its live moist wood. Live limbs usually have vibrant terminal buds, and dead limbs terminal buds are dried up, black or dark brown, or completely non-existent depending on how long the branch has been dead.
Depending on the tree species, dead limbs generally droop, and live limbs are usually more upright.
Dead Maple Branch
Alive Maple Branch
Generally, when a tree climber is up a tree it is easier to identify dead limbs than from below. The sunlight helps from above also, from below herve leger skirts there is usually herve leger white a shadow under the branches making it difficult to see subtle differences. The best way to prune or trim herve leger bandage dress sale a tree is naturally. This means that only diseased, dying, dead, split, jagged, herve leger bags or improperly herve leger fall balanced limbs are removed. It is necessary sometimes to remove live limbs, especially if a tree is potentially hazardous with a lean. If a large heavy limb is on the side of the lean and the tree has grown towards a structure, then by removing this large limb (leader) you can decrease the chance of tree fall. A trees canopy and weight of large limbs has a lot to do with why a tree falls in a storm. Especially a tree is not diseased or dead, although usually there is a mix of issues for a large tree to tumble over in a storm.
Tree trimming, cutting, pruning, & shaping are necessary tasks. As homeowners, it is our responsibility to maintain our trees and keep our yards and neighbors safe. Performing tree work of any kind in the winter is a smart move on the annual tree maintenance budget. So put on a warm coat, get out there in that Cold weather, and get those trees pruned!

Related articles:


cheapest Herve Leger on sale 2
griffis99
New php-forum User
New php-forum User
 
Posts: 40
Joined: Mon Dec 17, 2012 12:41 am


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.