Mixed/multipart Request with a image file and a amr audio file

Hi people
I am struggling with multipart/mixed request as i am new to java and http. I basically have to write a java code to send a request with two attachments, an audio amr file and a image file of a proprietry format. following is my code
public static void GetVideo()
     HttpURLConnection httpConnection = null;
InputStream bis = null;
     InputStream bis1 = null;
OutputStream bos = null;
     File audioFile = new File("voicejunk.amr");     
     File avatarFile = new File("out.frf");
     System.out.println("Entered Get Video");
     String Boundary = new String("asdfgh");
try
URL url = new URL("http://10.4.21.51:5006/");
httpConnection = (HttpURLConnection) url.openConnection();
     httpConnection.setRequestProperty("Cache-control", "no-cache");
httpConnection.setRequestProperty("Pragma", "no-cache");
httpConnection.setRequestProperty("Content-Type", "multipart/mixed;boundary= \"asdfgh\"");
     httpConnection.setRequestProperty("video-type", "3GPP");
     httpConnection.setRequestProperty("video-encoder", "H.263");
httpConnection.setRequestProperty("audio-encoder", "AMR-NB");
     httpConnection.setRequestProperty("video-size", "QCIF");
     httpConnection.setRequestProperty("video-fps", "10.0");
     httpConnection.setRequestProperty("video-anti-aliasing","yes");      
     httpConnection.setRequestProperty("Content-Length", Long.toString(audioFile.length()+avatarFile.length()+(3*Boundary.length())));     
     //byte[] bytes = createMessage();
     //httpConnection.setRequestProperty("Content-Length", String.valueOf(bytes.length));     
//System.out.println("Size of: "+bytes.length);     
     httpConnection.setRequestProperty("Expect", "100-continue");          
     httpConnection.setRequestProperty("Connection", "Keep-Alive");
     //String AvatarType = new String("FRF");     
httpConnection.setRequestMethod("POST");
     httpConnection.setDoOutput(true);     
     bos = new BufferedOutputStream(httpConnection.getOutputStream());
     bos.write(Boundary.getBytes());
     Session session = Session.getDefaultInstance(new Properties());          
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     Message msg = new MimeMessage(session);
MimeBodyPart mbp1 = new MimeBodyPart();
FileDataSource filedatasource1 = new FileDataSource("seestorme.frf");
DataHandler dh1 = new DataHandler(filedatasource1);
mbp1.setDataHandler(dh1);
mbp1.setHeader("Content-Type", "x-seestorm-avatar/frf");
     MimeMultipart mmp = new MimeMultipart();
mmp.addBodyPart(mbp1);
msg.setContent(mmp);
msg.writeTo(baos);
     bos.write(baos.toByteArray());     
bos.write(Boundary.getBytes());
     ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
     Message msg2 = new MimeMessage(session);     
     MimeBodyPart mbp2 = new MimeBodyPart();
FileDataSource filedatasource2 = new FileDataSource("voice.amr");
DataHandler dh2 = new DataHandler(filedatasource2);
mbp2.setDataHandler(dh2);
mbp2.setHeader("Content-Type", "audio/amr-nb");
     MimeMultipart mmp2 = new MimeMultipart();
mmp2.addBodyPart(mbp2);
     msg2.setContent(mmp2);
msg2.writeTo(baos2);
     bos.write(baos2.toByteArray());     
bos.write(Boundary.getBytes());          
//httpConnection.getOutputStream().write(bytes);
     //httpConnection.getOutputStream().flush();
     System.out.println("Request made");
int result = httpConnection.getResponseCode();
     String Msg1 = new String(httpConnection.getHeaderField(0));
     String Msg2 = new String(httpConnection.getHeaderField(1));
     String Msg3 = new String(httpConnection.getHeaderField(2));
     String Msg4 = new String(httpConnection.getHeaderField(3));     
     String Msg5 = new String(httpConnection.getHeaderField(4));
     System.out.println(Msg1+" " + Msg2+" " + Msg3+" " + Msg4+" " + Msg5+" ");
if (HttpURLConnection.HTTP_OK == result) {
          System.out.println("Received HTTP result = " + result);
saveResponseData2(httpConnection.getInputStream(),"SeeStorm.frf");
} else {
System.out.println("Received HTTP result = " + result);
     catch (MessagingException me) {
me.printStackTrace();
catch (MalformedURLException mue) {
mue.printStackTrace();
} catch (ConnectException ce) {
ce.printStackTrace();
} catch (IOException ioe) {
     ioe.printStackTrace();
} finally {
if (null != bis) {
try {
bis.close();
} catch (IOException ioe) {
ioe.printStackTrace();
if (null != httpConnection) {
httpConnection.disconnect();
i frankly have no idea how to create a multipart mixed request with boundaries. I get a bad http request error with the above code. Can please someone help me.
Thanks
Adil Saleem

Your WriteImage servlet needs to read the image file in from wherever it is (hard drive, database, whatever), then write it back out to the browser. To do that, first use the HTTPServletResponse object to send the appropriate headers, then call the getOutputStream() method to get an output stream to write the data to. This data will be sent to the browser which, if you've set the headers correctly, will display it as an image.
It's been a long time since I did this (we abandoned storing images in databases quite a long time ago), so I can't be more specific than that, but hopefully that'll be enough to get you going. If you run into any problems, reply and I'll see if I can help further.

Similar Messages

  • For the last 2 days whenever I try to upload photos from my iPhoto page to facebook I get an error message: Bad Image There was a problem with the image file.  I haven't knowingly changed any settings on iPhoto or facebook. Can anyone help, please ?

    I need help with uploading photos from iPhoto to facebook. I could do it till 2 days ago. Now any new photo I try to upload gives me an error message:
    Bad Image
    There was a problem with the image file. 
    Please help.

    Can you drag it to the Desktop?

  • How to mix time lapse with still images and imported movies ?

    Hello
    I have been shooting photos (time lapse with Camera Pro) and movies with a Nokia N8 and would love to use iMovie to mount all that.
    Unfortunately, for the time lapse I cannot get the duration of the photos to 0.03s, it just won't accept it. I have been looking around the forum and could only find sort of solutions when you have a transition or effect on the pictures but not when they are just fit to the screen...
    So now the time lapse looks much slower and broken than the movie itself... and it does not look nice.
    Another way would be to make the time lapse with QT Pro and then import it but I am affraid I am loosing quality in the process.
    Anybody knows how to fix this duration problem ?
    Thank you in advance for any helpful answer.
    Petri
    Mac OS 10.6.8
    iMovie : 9.0.4

    Able, Jim,
    thanks a lot, both solutions work just fine.
    Take the first image, adjust the Effects, copy it, select the other images and past attributes
    and
    just put all images together, make a new sequence and use that first sequence as nested sequence and put the effects on that

  • Flex file upload issue with large image files

         Hello, I have created a sample flex application to upload an image and also created java servlet to upload and save image and deployed in local tomcat server. I am testing the application in LAN. I am able to upload small as well as large image file(1Mb) from some PCs but in some other PCs I am getting IOError while uploading large image files however it is working fine for small images. Image uploading is hanging after 10%-20% and throwing IOError. *Surprizgly it is working Ok with XP systems and causeing issues with Windows7 systems*.
    Plz give me any idea to get a solution.
    In Tomcat server side it is giving following error:
    request: org.apache.catalina.connector.RequestFacade@c19694
    org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:371)
            at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.ja va:126)
            at flex.servlets.UploadImage.doPost(UploadImage.java:47)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProto col.java:594)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStre am.java:982)
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:8 86)
            at java.io.InputStream.read(InputStream.java:101)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:96)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:66)
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:366)
    UploadImage.java:
    package flex.servlets;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    import java.util.regex.*;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UploadImage extends HttpServlet{
             * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
             *      response)
            protected void doGet(HttpServletRequest request,
                            HttpServletResponse response) throws ServletException, IOException {
                    // TODO Auto-generated method stub
                    doPost(request, response);
            public void doPost(HttpServletRequest request,
                            HttpServletResponse response)
            throws ServletException, IOException {
                    PrintWriter out = response.getWriter();
                    boolean isMultipart = ServletFileUpload.isMultipartContent(
                                    request);
                    System.out.println("request: "+request);
                    if (!isMultipart) {
                            System.out.println("File Not Uploaded");
                    } else {
                            FileItemFactory factory = new DiskFileItemFactory();
                            ServletFileUpload upload = new ServletFileUpload(factory);
                            List items = null;
                            try {
                                    items = upload.parseRequest(request);
                                    System.out.println("items: "+items);
                            } catch (FileUploadException e) {
                                    e.printStackTrace();
                            Iterator itr = items.iterator();
                            while (itr.hasNext()) {
                                    FileItem item = (FileItem) itr.next();
                                    if (item.isFormField()){
                                            String name = item.getFieldName();
                                            System.out.println("name: "+name);
                                            String value = item.getString();
                                            System.out.println("value: "+value);
                                    } else {
                                            try {
                                                    String itemName = item.getName();
                                                    Random generator = new Random();
                                                    int r = Math.abs(generator.nextInt());
                                                    String reg = "[.*]";
                                                    String replacingtext = "";
                                                    System.out.println("Text before replacing is:-" +
                                                                    itemName);
                                                    Pattern pattern = Pattern.compile(reg);
                                                    Matcher matcher = pattern.matcher(itemName);
                                                    StringBuffer buffer = new StringBuffer();
                                                    while (matcher.find()) {
                                                            matcher.appendReplacement(buffer, replacingtext);
                                                    int IndexOf = itemName.indexOf(".");
                                                    String domainName = itemName.substring(IndexOf);
                                                    System.out.println("domainName: "+domainName);
                                                    String finalimage = buffer.toString()+"_"+r+domainName;
                                                    System.out.println("Final Image==="+finalimage);
                                                    File savedFile = new File(getServletContext().getRealPath("assets/images/")+"/LowesFloorPlan.png");
                                                    //File savedFile = new File("D:/apache-tomcat-6.0.35/webapps/ROOT/example/"+"\\test.jpeg");
                                                    item.write(savedFile);
                                                    out.println("<html>");
                                                    out.println("<body>");
                                                    out.println("<table><tr><td>");
                                                    out.println("");
                                                    out.println("</td></tr></table>");
                                                    try {
                                                            out.println("image inserted successfully");
                                                            out.println("</body>");
                                                            out.println("</html>");  
                                                    } catch (Exception e) {
                                                            System.out.println(e.getMessage());
                                                    } finally {
                                            } catch (Exception e) {
                                                    e.printStackTrace();

    It is only coming in Windows 7 systems and the root of this problem is SSL certificate.
    Workaround for this:
    Open application in IE and click on certificate error link at address bar . Click install certificate and you are done..
    happy programming.
    Thanks
    DevSachin

  • File size with JPEG Image files

    I recently had to re-load all of my photos from an external hard drive due to the fact that my hard drive crashed. When I did, I noticed that the files are JPEG Image files. As a result, the file size is considerably smaller than the original file and the quality is much less.
    Any suggestions on how to restore the file to the original format and quality?

    Connie:
    Yes, it seems you backup the Data folder instead of the Originals folder. Unfortunately, there's nothing you can do at this time.
    In the future, I suggest you copy the entire iPhoto Library folder to the external and then keep it updated with a backup application like Digital Backup, Snyk, etc. They compare B (the backup copy) with A (the working copy) and copy new or changed files from A to B to keep them identical. After the initial copy process, the subsequent backups are rather quick, about a minute or less.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Matching IOS capwap flash image file with Wlc image file

    Hello to all Wireless Expert
    My question will perhaps seems a little bit obvious for some of you, but here it is :)
    I'd like to understand the relation between the Capwap IOS image file that I can see while typing 'dir flash' on an AP, and the version a WLC gives to that AP when joining it. My wlc is running 7.4.100 and on the AP's flash (2602i):
    MYCAPWAPAP#dir flash:
    Directory of flash:/
        2  -rwx       75095  Oct 23 2014 07:54:43 +00:00  event.log
        3  -rwx         280  Oct 23 2014 07:57:35 +00:00  lwapp_officeextend.cfg
        4  -rwx       49372  Oct 23 2014 09:37:14 +00:00  lwapp_non_apspecific_reap.cfg
        5  -rwx       95008  Oct 23 2014 07:54:34 +00:00  lwapp_reap.cfg.bak
       10  drwx        2048  Oct 23 2014 07:54:33 +00:00  ap3g2-k9w8-mx.152-4.JB6
       51  drwx         128  Oct 23 2014 07:57:38 +00:00  configs
       52  -rwx          64  Oct 23 2014 07:54:34 +00:00  sensord_CSPRNG0
       53  -rwx          64  Oct 23 2014 07:54:34 +00:00  sensord_CSPRNG1
       77  -rwx       95008  Oct 23 2014 07:57:55 +00:00  lwapp_reap.cfg
        7  -rwx        7192  Oct 23 2014 09:36:56 +00:00  private-multiple-fs
       56  -rwx           0  Mar 26 2014 14:37:17 +00:00  ce
       13  drwx         448   Nov 9 2013 19:06:17 +00:00  ap3g2-rcvk9w8-mx
        8  -rwx       75303  Oct 22 2014 16:30:26 +00:00  event.capwap
       76  -rwx         230  Oct 23 2014 07:57:34 +00:00  env_vars
    31739904 bytes total (10376704 bytes free)
    Does it mean that the 7.4.100 image file is included in the ap3g2 file? In other word, where is stored the wlc firmware image on the AP? As an AP has a primary image and a backup one, it must be stored somewhere on it, or maybe I'm missing something here!
    Thanks,
    Theo

    Hi Theo,
    If you read this post you will understand the ap3g2 represent the AP platform.
    https://supportforums.cisco.com/document/77131/understanding-access-point-ios-images
    platform-featureset-tar.version.tar
    ap1g1 - 700 series (702w beginning with 15.2(4)JB5)
    ap1g2 - 1600 series
    ap1g3 - 1530 series
    ap3g2 - 3700/3600/2700/2600 series (3700 supported beginning with 15.2(4)JB; 2700 beginning with 15.2(4)JB5)
    ap3g1 - 3500/1260 series
    In lightweight mode, there is Recovery Imange & Full-image. (Recovery image has min files to boot the AP & discover a WLC, then  WLC will push the full image according to the software code running on WLC.
    ap3g2-k9w8-mx.152-4.JB6
    ap3g2-rcvk9w8-mx
    In this case you can see some directories with the above name on your AP. So corresponding image should be within these sub-directories.
    HTH
    Rasika
    **** Pls rate all useful responses ****

  • Files with raster image file extension ".THM": is it needed on Macs?

    I've offloaded AVI videos files from a Canon digital camera. With each AVI file is a THM file. Does it serve any purpose when playing the AVI file in Quicktime on Macs or PCs?

    Not really.
    The .THM file is a thumbnail image. It acts like an icon preview of the .avi.

  • Can I create a system image with System Image Utility and then transfer the image folder to another server?

    I am currently in the process of creating several images to restore for classroom purposes. I am wondering if it is possible to use the System Image Utility on a computer which has Server Admin Tools installed, then transfer that image folder directly to the "NetBoot" folder on our current Apple Netboot Server. Has anyone tried this and/or succeeded? I'd like to get some feedback before attempting it myself on our college's netboot server. Thanks!

    We've run into a few problems concerning this process. When we create the image on a seperate machine from the server using SIU and then place it in the NetBoot folder, not every .nbi folder created works properly. We're running into errors that say "Could not find any scan information. The source needs to be imagescanned before it can be restored". This does not happen with every image, but it does happen with computers which have a lot of programs installed on them. Is there a way to imagescan the .nbi folder and/or resolve this issue without going through the process of making a completely new NetRestore image?

  • How to setup the article master and link up with the image file of that art

    I nteed help to setup the article master to display article image.
    Can someone guide me with the details?
    Thanks

    Hi Colin,
    In MM41/42/43 from the Main menu select System->Services for Object. Now select Create to Attach any file (the article Photo).
    You can view the Photo by going to same transactions and select System->Services for Object. Now select Attachmetn List.
    This is one of the method to attach document to an object in SAP.
    Another standard way is to do it using DMS module. I have done it before but do not remember the exact process. Will let you know if and when I get details.
    Regards,
    Arun Devidas

  • Batch Replace Smart Object With Different Image Quality and Sizes

    Hi there,
    I need help. I have this template that is in 1000x1000pixel and 300 dpi. I'm trying to replace the smart object inside with various JPEG that I have. These JPEG comes in large image sizes but lower than 300dpi. The issues is, when I run the script that I have, some of the pictures become really pixelated. Beforehand, I resized them to fit into the empty place in sizes that I find fit the best (8 cm x 6 cm). Some of them work okey, but then some of them just pretty bad. I'm wondering if you can help me fix the script that I have so I didn't have to resized the images before running the script, and for all of them to automatically fit into my template without altering the quality of the image that I put in.
    below is the script that I am using and the screenshot of my template:
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    var theName= myDocument.name.match(/(.*)\.[^\.]+$/)[1];
    var thePath = myDocument.path;
    var theLayer = myDocument.activeLayer;
    // psd options;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = true;
    psdOpts.layers = true;
    psdOpts.spotColors = true;
    // check if layer is smart object;
    if (theLayer.kind != "LayerKind.SMARTOBJECT") {alert ("selected layer is not a smart object")}
    else {
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", "*.psd;*.jpg;*.jpeg;*.tif", true)}
    else {var theFiles = File.openDialog ("please select files", getFiles, true)};
    if (theFiles) {
    // work through the array;
    for (var m = 0; m < theFiles.length; m++) {
    // replace smart object;
    theLayer = replaceContents (theFiles[m], theLayer);
    var theNewName = theFiles[m].name.match(/(.*)\.[^\.]+$/)[1];
    //Raise color picker for Back cover;
    try {
    app.activeDocument.activeLayer = app.activeDocument.layers[app.activeDocument.layers.length - 1];
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
    var desc7 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref2 = new ActionReference();
    var idcontentLayer = stringIDToTypeID( "contentLayer" );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idTrgt = charIDToTypeID( "Trgt" );
    ref2.putEnumerated( idcontentLayer, idOrdn, idTrgt );
    desc7.putReference( idnull, ref2 );
    var idT = charIDToTypeID( "T " );
    var desc8 = new ActionDescriptor();
    var idClr = charIDToTypeID( "Clr " );
    var idsolidColorLayer = stringIDToTypeID( "solidColorLayer" );
    desc7.putObject( idT, idsolidColorLayer, desc8 );
    executeAction( idsetd, desc7, DialogModes.ALL );
    } catch (e) {};
    //save jpg;
    myDocument.saveAs((new File(thePath+"/"+theName+"_"+theNewName+".jpg")),psdOpts,true);
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
    if (theFile.name.match(/\.(psd|tif|jpeg|jpg)$/i) != null || theFile.constructor.name == "Folder") {
    return true
    ////// replace contents //////
    function replaceContents (newFile, theSO) {
    app.activeDocument.activeLayer = theSO;
    // =======================================================
    var idplacedLayerReplaceContents = stringIDToTypeID( "placedLayerReplaceContents" );
    var desc3 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    desc3.putPath( idnull, new File( newFile ) );
    var idPgNm = charIDToTypeID( "PgNm" );
    desc3.putInteger( idPgNm, 1 );
    executeAction( idplacedLayerReplaceContents, desc3, DialogModes.NO );
    return app.activeDocument.activeLayer

    Thank you for your answer.
    I was resizing it before from bigger image size to a smaller one (121 cm to 8 cm) which fit my template size. But the dpi remains in 72 which makes the picture pixelized.
    I am wondering if I can find a script that will keep the size of the first image that I put on the template for other images that I place, regardless the size they are imported to. Basically, how to make them all fit into the template regardless the size.
    Thank you for the info about the scripting forum. I will write there too.
    Sorry, I'm so new to this

  • CS6 crashing with certain image files

    With some files, when I begin to manipulate the image (resize, color/hue changes, etc) the program crashes and closes with the following... which means nothing to me.  I have had snd used the program for years. I use Win XP SP3
    adobe photoshop cs6 error signature AppName: photoshop.exe     AppVer: 13.0.1.34     ModName: msvcr100.dll ModVer: 10.0.40219.1     Offset: 0008d6fd
    Can anyone help? Thanks

    The machine is several years old but I have had no problem with other programs.  It is an embedded  Intel 84295g chipset and I will runs some diagnostics on it.
    OUTLOOK SIGNATURE
      Website:  <https://sites.google.com/site/californiabluedog/> www.bluedogranch.net

  • I occassionally work with 1GB+ image files, PS CC locks up after...

    I create photorealistic backgrounds for dye sublimation printing, amongst thousands of other things. These are large images, such as yesterday's which was 58x84 inches at 300 dpi, created from a scanned transparency. I tried Photoshop 6 from the Creative Cloud yesterday in prepping this image, using many tools, including the new scaling algorithms, which were quite good. I believe there are a few obvious improvements to make to Photoshop 6 to increase its awe level, but I must play more before making suggestions. It worked well, but after saving the file out, that was it. Photoshop 6 was frozen. Luckily, it saved correctly.
    So, first time in CS 6 from the Cloud, and I broke it.
    Perhaps the trial version does not have memory management in place yet.

    Photoshop uses 229.2MB of RAM for itself, and runs about 32-34 threads and 0% of CPU at idle. With the 64 bit Mac OSX system, a calculator, and Firefox also running, the total RAM draw is about 2.85 GB, leaving more than 5GB of free RAM. Photoshop needs a bit over twice the size of any image in editing to cache correctly. Photoshop (finally) uses OpenCL as well, and I have a monster second graphics card to give Photoshop all the GPU it needs.
    So, as long as I do not edit graphics above about 2GB (taken singly) I have no performance or speed issues under high quality RAM of 8GB. So, for smaller, images, I can edit a LOT of images with no performance issues. I do a lot of magazine ad work, which is all low resolution, comparitively.
    For video editing (I am a film festival and Bravo Channel competition winning, once upon a wayback time, Academy Award Nominated filmmaker,) although I am an Adobe Master Suite user, I use Final Cut, 7 and now, mostly X, and occassionally Avid. Essentially, nobody uses Adobe Premiere in the professional editing world. As it extensively uses OpenCL, Final Cut X, which has finally grown up after many iterations and upgrades and amazing third party support, runs happily in 8GB for up to feature length 1080p HD projects, of which I have cut a few on this box without performance issues. Final Cut X is about 250-1500% faster than Final Cut 7 for most things, as GPU rendering is really fast, even offering near online (near-line) review of unrendered things in real time. Small, 2-3 day projects in Final Cut 7 are under 1 day in Final Cut X. It's a monstrous difference, and it scales across larger productions. In 3D, I have been a go-to guy to fix S3D discrete 2 eye view stuff, as just about no one shoots it properly such that now, most just convert 2D. I do all of that on this lowly box.
    Why I don't upgrade this box is that it is a dinosaur. There is a pragmatic cost involved. While many languish in a murky SATA Card-Centric world, I prefer moving toward Thunderbolt with the new Mac Pro, which might be out by January. Final Cut X is being upgraded to this new box, and simple 4K pixel for pixel editing will be standard on Apple 4K monitors without worrying if the fiber channel is working in its paleolithic manner. Sony might have a 4K mastering monitor which costs like a nice BMW by then. While I have seen 15K monitors and video from the Japanese, this country is stuck at 1080 at a low level of adoption, and 4K in the home is a vanity at this time and exceedingly rare. The important thing is to be READY.
    Thus, the money is for maxed out new Macs, 24 of which will fit in my editing desk. I am thinking Thunderbolt-driven OpenCL based Infiniband replacement will be on its way, maybe even from Apple, given the many Thunderbolt ports of the new motherboard.

  • External Hard Drive Suddenly Loaded With Corrupt Image Files (Mac User)

    I'm using an iMac with CS6. I have an external Maxtor 1TB drive that is 13 months old. I have had no issues at all with it until today, when I attempted to access  a PSD file from the drive and received an error message telling me that the document was not a valid photoshop file. I looked at the directory at this point and noticed that the preview icons for many of the photoshop and jpg files on the drive were disabled. In each of these cases, the files will not open.
    I have:
    1. Repaired permissions and volumes on the external drive.
    2. Changed the file extension and attempted to open.
    3. Opened the file in a hex editor and looked for extra lines of code, or text, or whatever.
    4. Copied the file to a different drive.
    5. Attempted to open in a different program (Preview, Illustrator)
    In no cases will the files open, and I'm stumped. The drive itself seems to be working fine. Not every file is affected, and the files that are affected are both in a variety of locations on the drive and were created over a period of years. Any ideas about how to resolve this issue will be sincerely appreciated.

    thx1138b wrote:
    I looked at the directory at this point and noticed that the preview icons for many of the photoshop and jpg files on the drive were disabled. In each of these cases, the files will not open.
    In no cases will the files open. The drive itself seems to be working fine.
    If you open the folder in Bridge and the thumbnails just show icons try purging the cache.  Go to Tools/cache/purge cache for xxxx folder.  Let thumbs rebuild and if you still have just icons for those problem files I would say the drive is not working fine.
    The problem may be intermittent, but I would have very little faith in it.  See if you can find other programs to test the drive for bad segements and read/write operations. 
    If you put files on this drive also put the same file on another drive at the same time until you get this figured out.  Drive failure is not the uncommon.

  • How to print the spool request with a given file name.

    Dear Experts;
    I used FM RSPO_OUTPUT_SPOOL_REQUEST to print spool request. And the device type is a local pdf printer. By default, the download file name will be the spool id. How can I change the download file name? Thanks!
    Convert 'CutePrinter' to qualify the format.
      CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
        EXPORTING
          input  = 'CutePrinter'
        IMPORTING
          output = lv_device.
    Downloading as pdf by printer
      CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
        EXPORTING
          device                         = lv_device
          spool_request_id               = pa_spool
       EXCEPTIONS
         archive_dest_invalid           = 1
         archive_dest_not_found         = 2
         archive_dest_no_right          = 3
         cannot_archive                 = 4
         change_archdest_no_right       = 5
         change_copies_no_right         = 6
         change_dest_no_right           = 7
         change_devtype_no_right        = 8
         change_prio_no_right           = 9
         change_telenum_no_right        = 10
         change_title_no_right          = 11
         dest_invalid                   = 12
         dest_not_found                 = 13
         dest_no_right                  = 14
         internal_problem               = 15
         invalid_fax_attribute          = 16
         invalid_parameters             = 17
         non_owner_no_right             = 18
         no_layout                      = 19
         no_spool_request               = 20
         out_again_no_right             = 21
         spooler_problem                = 22
         OTHERS                         = 23

    SELECT SINGLE * FROM tsp01 into rq WHERE rqident = p_spool  .
    *   To get attributes of spool request
    CALL FUNCTION 'RSPO_GET_ATTRIBUTES_SPOOLJOB'
        EXPORTING
          rqident     = p_spool             "Spool Request Number
        IMPORTING
          rq          = rq                                 "Consists the Spool Document Type Details
        TABLES
          attributes = dummy
        EXCEPTIONS
          no_such_job = 1
          OTHERS      = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *Convert spool request into PDF, dependent on document type
    IF rq-rqdoctype = 'OTF' OR rq-rqdoctype = 'SMART'.    "Doc Type is of Sap Script or Smart form
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = p_spool               "Spool Request Number
            no_dialog                = 'X'
            pdf_destination          = 'X'
            no_background            = 'X'
          IMPORTING
            pdf_bytecount            = bin_size
            bin_file                 = pdf_xstring                  "This fm will convert the spool data into
         TABLES
            pdf                      = it_pdf   .                                                                       "PDF Format in this importing string
      ELSEIF rq-rqdoctype = 'LIST'.                 "Doc Type of List
    * Convert spool to PDF
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = p_spool               "Spool Request Number
            no_dialog                = ' '
            dst_device               = 'LOCL'
            pdf_destination          = 'X'
            no_background            = 'X'
          IMPORTING
            pdf_bytecount            = bin_size
            bin_file                 = pdf_xstring                     "This fm will convert the spool data into
                                                                                  "PDF Format in this importing string
          TABLES
            pdf                      = it_pdf.
        ENDIF.
    *      Downloading file to p_file loation in PDF foramt
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize            = bin_size
              filename                = w_filename     "Custom File name
              filetype                = 'BIN'
            TABLES
              data_tab                = it_pdf
    Prabhudas

  • Working with original image file...

    I'm retouching some images and would like to preserve the original file while doing so, instead of saving multiple drafts of the image in progress in case I need to go back and change something.  Is there a way to use layers or vector masks to do this?  The history panel can only go back so far..

    I like to take a snapshot (in History flyout menu) every so often so if I want to go back further than history allows I can click on a snaphot and there I am.
    Also use snaphot if I am not sure my next technique will be better or worse.

Maybe you are looking for

  • What is the policy EXACTLY since Ive been told 2 seperate things?

    I got a BB Bold 9650 in Nov of last year. Since then, I have had SEVEN refurbs. Each one with different problems. My first refurb was 6 weeks after I got my NEW device. Ive had a myriad of problems, each phone with a different issue, although some ha

  • Reader 10.0 Printing Problem - Font changing while printing

    Dear all, can anybody help me on my printing problem with Adobe Reader 10.0 ? While printing a pdf I cannot do anything else, it is not possible to touch the mouse because when I do this, the font is changing while printing to something like grecian.

  • Portal Run time error when created a seperate role for Transport package.

    Hi Experts, I have created a seperate role for Transport Package(import/export iviews). Normally we have transport package functionality in system admin. Below steps i followed for creating the new role(trans admin) 1.Copied SAP provided system admin

  • Playing Games on MacBook

    I have a Macbook 10.5.5 with: Model Name: MacBook Model Identifier: MacBook4,1 Processor Name: Intel Core 2 Duo Processor Speed: 2.4 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 3 MB Memory: 2 GB Bus Speed: 800 MHz I wanna go get th

  • Jdbc and SQLServer

    I am trying to connect to a SQLServer database from my servlet using jdbc connectivity. I am able to connect to the db if I create a datasource. but if I try to make a connection by giving the connection string (DriverManager.getConnection(..)), I am