×

Discussion Board

Results 1 to 9 of 9

Thread: Image Editor

  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Thumbs down Image Editor

    Hi Everyone,

    am working on S60 3rd edition FP1 version, my project consists of fetching the

    images from phone memory and card memory ,in grid view and and there should be

    posiibility for the user to select the image and edit the image and save that

    image, now am able to retrieve the phone and card memory images and also

    display the same in grid view. my next task is open the particular image by

    clicking grid items and edit the image, can anybody tell me how can i do this

    opening and editing the image???


    any help will be appriciated..

    Thanks...

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Image Editor

    have you looked at http://wiki.forum.nokia.com/index.php/Grid_example in wiki. if yes what problem you are facing .

  3. #3
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Re: Image Editor

    Thanks skumar_rao ,

    I have followed the example provided by you, and able to show the grid with images fetched from phone and card memory, but i could not able to put scrollable grid control, i.e my grid contains only 9 grid items and if there are more than 9images in phone the application will simplt exits.. now i want to make my grid as scrollable one and My second problem is how could display
    folders containing images rather than images itself and if click the folder it should display the images in that folder in grid format ,my current code displays all the images going to depth of each directory and displays all the images at once..

    how can i achieve this???

    Thanks....

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Image Editor

    now i want to make my grid as scrollable one
    have you noticed the links below that wiki article which describes more on Grids like scrolling & selecting etc.

    My second problem is how could display folders containing images rather than images itself and if click the folder it should display the images in that folder in grid format ,my current code displays all the images going to depth of each directory and displays all the images at once..
    one way might be you can use a static folder icon and show it when you want to display the folder in grid.

  5. #5
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Re: Image Editor

    Hi ,

    My doubt is not about the placing an folder icon , but how could i

    dfferentiate between folder and file itself.

    right now am using

    TFileName path = PathInfo::PhoneMemoryRootPath();

    path.Append(PathInfo::ImagesPath());

    and then checking whether file is directory or not ,and if file is a directory then i want to display folder name with a static icon as u said... in the grid,

    thanks..

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Image Editor

    can you show us how you are traversing all files in a Folder. basically you have to use TEntry::IsDir()

  7. #7
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Re: Image Editor

    Thanks ..

    Here is my code which i used to display all the files in the image path..
    void somefunction()
    {
    iFsSession = iEikonEnv->FsSession();
    TFileName path = PathInfo::PhoneMemoryRootPath();
    TFileName path1 = PathInfo::MemoryCardRootPath();

    path.Append(PathInfo::ImagesPath());
    path1.Append(PathInfo::ImagesPath());

    TRAPD(error1,getResourceL(path));
    TRAPD(error2,getResourceL(path1)
    }

    void getResourceL()
    {

    if(! BaflUtils::PathExists(iFsSession, aBasePath))
    {
    return;
    }

    User::LeaveIfError(iFsSession.GetDir (aBasePath,KEntryAttNormal,ESortByName,files,dirs));

    CleanupStack::PushL(files);
    CleanupStack::PushL(dirs);


    for(TInt i=0; i<files->Count();i++)
    {
    if(!files->operator [](i).IsDir())
    {

    iFileList.Append((*files)[i]);
    TFileName fileName;
    fileName.Append(aBasePath);

    fileName.Append(files->operator [](i).iName);

    if( fileName.Find(_L(".jpg"))!= KErrNotFound
    || fileName.Find(_L(".jpeg"))!= KErrNotFound
    || fileName.Find(_L(".gif"))!= KErrNotFound
    || fileName.Find(_L(".png"))!= KErrNotFound
    || fileName.Find(_L(".bmp"))!= KErrNotFound)
    { iFiles.Append(fileName);
    }
    }

    else if (files->operator [](i).IsDir())
    {
    iDirList.Append(aBasePath);
    }

    }

    for (TInt i =0; i< dirs->Count();i++)
    {
    TFileName dirFileName;
    dirFileName.Append(aBasePath);
    dirFileName.Append( dirs->operator [](i).iName);
    dirFileName.Append( KSlash );
    getResourceL(dirFileName);
    }

    CleanupStack::PopAndDestroy( 2 );

    }


    thing is this code displays image files ,which i wanted to do only after displaying folder in the ImagePath ,

    Thanks...

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Image Editor

    which i wanted to do only after displaying folder in the ImagePath
    sorry still did not understand can you explain more .

  9. #9
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    64

    Re: Image Editor

    Yup!!!


    what i actually wanted is in the first phase i want to display the folders in the PhoneImage path in grid view where each folder containing certain number of images are cells of the grid.

    i.e when i run my code the first screen should display the different folders containing images, in a grid view.

    Next whenever i click any folder (grid cell which actually represent folders)

    the images in that particular folder should be displayed either in grid view or list view...

    Waht am getting really is the 2nd task( displaying the images) in first shot , which i dont want... first i should display the folders then images in the folders.

    Thanks...

Similar Threads

  1. J2ME Scaling big JPEG files on S60 5th ed and CS001269
    By m1ha3l in forum Mobile Java Media (Graphics & Sounds)
    Replies: 14
    Last Post: 2010-04-06, 07:05
  2. NullPointerException when using retreived Image
    By emdiesse in forum Mobile Java General
    Replies: 3
    Last Post: 2010-03-19, 18:13
  3. Problem with Image show application
    By yatin_indianic in forum Mobile Java General
    Replies: 1
    Last Post: 2010-03-09, 07:13
  4. Replies: 2
    Last Post: 2009-01-22, 06:03
  5. image failed to load
    By killarkai in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2003-07-25, 13:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×