Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1

    Default converting eps file to any raster files(jpg,png,gif) in php..help..


    guys,
    im having trouble in handling eps files. since im working on a photo archiving system, i want users to upload images and one possible format is eps. and i cant seem to display eps in my browser, so i was thinking of just converting the eps file to a jpeg,png or gif file..but i really dont have an idea..

    can anyone help me out??..tnx..

  2. #2
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    where this eps file came from? does it strictly contains single page with bitmap only?

  3. #3
    not really sure..but the images are from a news company..i think it does contain it..do you have any experience in it sir??

  4. #4
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    yes...postscripts and wmf files, you need to contact the person in charge, take note of the operating system being used (source) as headers are different (SUSE, MAC etc...)... EPS from edited from adobe are different too... even EPS file taken from digital cameras... windows TIFF

    But I think your problem starts at how you convert this automatically right after the user uploaded that file, and where you will get the modules? what language you are using by the way? can you upload sample file? Maybe I could help... I hope it is not rasterized....

  5. #5
    EPS files are vector type right??..what do you mean by rasterized??..ive tried searching on the net and ive found a nice tool that can convert any image format, imagemagick and it works well in php( as to what ive read )..hehe..but i still dont know how to ues it yet and it is currently working on linux..im still researching on the installation on windows..

    im using PHP by the way..^__^

  6. #6
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    Rasterization or Rasterisation is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (pixels or dots) for output on a video display or printer, or for storage in a bitmap file format. Rasterisation - Wikipedia, the free encyclopedia

    Not all EPS files are vector type... This was my problem before. But I guess this won’t bother you, I assumed that you just want to have thumbnails view in your page out from the EPS?

    Find some free modules that support PHP (version you are using) to generate some thumbnails and display it in your web browsers. But you have to be extra careful; it might override some existing modules that would make the rest unstable.

    Another way is to find some freewares that can be triggered via command line, reads the data from the directory and convert the file.

  7. #7
    ive found a freeware.."ImageMagick" it works well with PHP (as so to what they said) but when i tried using it via command line in converting an eps file to jpeg, the jpeg file was not readable.

    i am thinking of just displaying a default "eps" jpeg file for my thumbnails, but still i cant open my eps file. uhmmm. what are programs that can open an eps file except for adobe photoshop??.because not all computers here have adobe..

  8. #8
    sir mark..ive decided to just open an application for my eps files..ive downloaded "IrFanView" and it can open my eps file but when i tried to open the eps file via php, it always prompts an error which is "Can't read file header"..im using this code to open my eps file, although im not sure if im using the correct mime type for eps files..
    PHP Code:
    <? include('db.php');

    $query = mysql_query("SELECT * FROM directory");
    $row = mysql_fetch_row($query);
    $image_folder = 'file:///'.$row[4];
    if (isset($_GET['name']) && basename($_GET['name']) == $_GET['name']) { 
    $img = $image_folder.$_GET['name'];
    $filename = $img;

    $mime = 'image/eps'; 

    header('Content-disposition: attachment; filename='.basename($filename));
    header('Content-Type: '.$mime);
    header('Content-Length: '. filesize($filename));
    readfile($filename);
    }
    ?>

  9. #9
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    Quote Originally Posted by ichiriki View Post
    sir mark..ive decided to just open an application for my eps files..ive downloaded "IrFanView" and it can open my eps file but when i tried to open the eps file via php, it always prompts an error which is "Can't read file header"..im using this code to open my eps file, although im not sure if im using the correct mime type for eps files..
    PHP Code:
    <? include('db.php');

    $query = mysql_query("SELECT * FROM directory");
    $row = mysql_fetch_row($query);
    $image_folder = 'file:///'.$row[4];
    if (isset($_GET['name']) && basename($_GET['name']) == $_GET['name']) { 
    $img = $image_folder.$_GET['name'];
    $filename = $img;

    $mime = 'image/eps'; 

    header('Content-disposition: attachment; filename='.basename($filename));
    header('Content-Type: '.$mime);
    header('Content-Length: '. filesize($filename));
    readfile($filename);
    }
    ?>

    That's what I've been telling you regarding the "HEADER" from my previous post...
    that you need to contact the person in charge, where these .eps files came from.

    yes...postscripts and wmf files, you need to contact the person in charge, take note of the operating system being used (source) as headers are different (SUSE, MAC etc...)... EPS from edited from adobe are different too... even EPS file taken from digital cameras... windows TIFF
    There are certain EPS that cannot be supported , as some of it has been commercialized (usually from hardware digital cameras, or software like photoshop), to make it short, they add some valuable information on the header... just the same what happen to any DXF files... thus DXF from AutoCAD are different from DXF in other 2D/3D modelling tools... even CAD version has its own DXF format, and so to this EPS file.

    can you upload some of your EPS file? I may try it as well....

  10. #10
    sir mark here are some sample of eps files..
    [IMG]C:/1.eps[/IMG]
    [IMG]C:/Grandeur.eps[/IMG]

    i hope they can help in helping me..hehe

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. how to chop2x a string into an array in php
    By jairoh_ in forum Programming
    Replies: 5
    Last Post: 01-18-2013, 04:50 AM
  2. How to get parent function inside another function in PHP
    By blackdream in forum Websites & Multimedia
    Replies: 1
    Last Post: 03-08-2012, 02:32 PM
  3. Replies: 33
    Last Post: 10-17-2008, 04:09 PM
  4. converting pdf files to jpg... unsa.on na mga bro?
    By radiostar in forum Software & Games (Old)
    Replies: 13
    Last Post: 06-18-2008, 09:19 PM
  5. how to convert ogg files to avi ??
    By zerk in forum Software & Games (Old)
    Replies: 7
    Last Post: 03-31-2007, 03:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top